> ## Documentation Index
> Fetch the complete documentation index at: https://docs.timbrix.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Get User Organizations

> ⚠️ SECURITY: Lists all organizations a user belongs to. Requires authentication with scope "read:organization". Supports both OAuth tokens and API keys. Returns organizations with membership details.

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

| Parameter | Type          | Required | Description |
| --------- | ------------- | -------- | ----------- |
| `id`      | string (UUID) | Yes      | User ID     |

## Authentication

Supports both:

* **OAuth tokens**: `Authorization: Bearer <oauth_token>`
* **API keys**: `X-API-Key: sk_...`

## Example Request

```bash theme={null}
curl -X GET http://localhost:3001/api/users/550e8400-e29b-41d4-a716-446655440000/organizations \
  -H "Authorization: Bearer <token>"
```

## Example Response

```json theme={null}
[
  {
    "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`


## OpenAPI

````yaml GET /users/{id}/organizations
openapi: 3.1.0
info:
  title: Timbrix API
  description: >-
    REST API with OAuth2 server for managing organizations, members, and
    webhooks
  version: '1.0'
  contact: {}
servers:
  - url: http://sandbox.mintlify.com
    description: Sandbox environment
  - url: http://localhost:3001/api
    description: Local development
security: []
tags:
  - name: organizations
    description: Organization management endpoints
  - name: oauth
    description: OAuth2 authentication and authorization
  - name: webhooks
    description: Webhook configuration and delivery
  - name: users
    description: User information endpoints
  - name: api-keys
    description: API Keys management and validation
paths:
  /users/{id}/organizations:
    get:
      tags:
        - users
      summary: Get user organizations
      description: >-
        ⚠️ SECURITY: Lists all organizations a user belongs to. Requires
        authentication with scope "read:organization". Supports both OAuth
        tokens and API keys. Returns organizations with membership details.
      operationId: UsersController_getOrganizations
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: >-
            Organizations retrieved successfully. Returns array of organizations
            with user roles and membership info.
        '401':
          description: Authentication required. Provide a valid OAuth token.
        '403':
          description: 'Insufficient scope. Required scope: read:organization'
      security:
        - apiKey: []
        - bearer: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API Key for authentication (format: sk_...)'
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````