Skip to main content
GET
/
users
/
{id}
/
organizations
Get user organizations
curl --request GET \
  --url http://sandbox.mintlify.com/users/{id}/organizations \
  --header 'X-API-Key: <api-key>'
Lists all organizations a user belongs to. Requires authentication with scope read:organization. Supports both OAuth tokens and API keys.

Permissions

Requires authentication with scope read:organization.

Path Parameters

ParameterTypeRequiredDescription
idstring (UUID)YesUser ID

Authentication

Supports both:
  • OAuth tokens: Authorization: Bearer <oauth_token>
  • API keys: X-API-Key: sk_...

Example Request

curl -X GET http://localhost:3001/api/users/550e8400-e29b-41d4-a716-446655440000/organizations \
  -H "Authorization: Bearer <token>"

Example Response

[
  {
    "id": "org_1234567890abcdef",
    "name": "Acme Corporation",
    "slug": "acme-corp",
    "role": "owner",
    "joinedAt": "2025-01-01T00:00:00Z"
  },
  {
    "id": "org_0987654321fedcba",
    "name": "Tech Pro",
    "slug": "tech-startup",
    "role": "admin",
    "joinedAt": "2025-01-15T00:00:00Z"
  }
]

Response Fields

Each organization includes:
  • Organization ID, name, and slug
  • User’s role in the organization (owner, admin, member)
  • Membership timestamp (when user joined)

Common Errors

401 Unauthorized

Authentication required. Provide a valid OAuth token.

403 Forbidden

Insufficient scope. Required scope: read:organization

Authorizations

X-API-Key
string
header
required

API Key for authentication (format: sk_...)

Path Parameters

id
string
required

Response

Organizations retrieved successfully. Returns array of organizations with user roles and membership info.