Get organization with members

Get organization details including members and pending invitations.

GET/api/orgs/{orgId}

Authorization

better-auth.session_token<token>

Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.

In: cookie

Path Parameters

orgId*string
curl -X GET "https://your-instance/api/orgs/string"
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Acme Corp",
  "slug": "acme-corp",
  "icon": null,
  "color": null,
  "members": [
    {
      "userId": "usr_abc123",
      "displayName": "Alice",
      "email": "[email protected]",
      "role": "owner",
      "joinedAt": "2026-01-10T08:00:00Z",
      "spaces": [
        {
          "id": "spc_default",
          "name": "Default",
          "source": "org_role",
          "role": {
            "kind": "preset",
            "key": "admin",
            "name": "admin"
          }
        }
      ]
    },
    {
      "userId": "usr_def456",
      "displayName": "Bob",
      "email": "[email protected]",
      "role": "member",
      "joinedAt": "2026-01-12T10:00:00Z",
      "spaces": [
        {
          "id": "spc_default",
          "name": "Default",
          "source": "open_space",
          "role": {
            "kind": "preset",
            "key": "operator",
            "name": "operator"
          }
        }
      ]
    }
  ],
  "invitations": []
}
{
  "type": "https://docs.appstrate.dev/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Invalid or missing session",
  "code": "unauthorized",
  "request_id": "req_abc123"
}
{
  "type": "https://docs.appstrate.dev/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "Insufficient permissions",
  "code": "forbidden",
  "request_id": "req_abc123"
}
{
  "type": "https://docs.appstrate.dev/errors/not-found",
  "title": "Not Found",
  "status": 404,
  "detail": "Resource not found",
  "code": "not_found",
  "request_id": "req_abc123"
}