# Organizations

## List organizations

```
GET /api/v1/organizations
```

Returns all organizations the authenticated user belongs to.

### Response

```json
{
  "data": [
    {
      "id": "org_uuid",
      "name": "Acme Inc.",
      "role": "ADMIN",
      "member_count": 12
    }
  ]
}
```

### Role values

| Role     | Description                                          |
| -------- | ---------------------------------------------------- |
| `OWNER`  | Full access, can transfer or delete the organization |
| `ADMIN`  | Manage members, folders, and all recordings          |
| `EDITOR` | Create and manage own recordings                     |
| `VIEWER` | Read-only access                                     |

***

## List folders

```
GET /api/v1/organizations/:id/folders
```

Returns all active folders in the organization. The authenticated user must be a member.

### Response

```json
{
  "data": [
    {
      "id": "folder_uuid",
      "name": "Product team"
    }
  ]
}
```

***

## List members

```
GET /api/v1/organizations/:id/members
```

Returns all members of the organization. The authenticated user must be a member.

### Response

```json
{
  "data": [
    {
      "id": "user_uuid",
      "email": "alice@example.com",
      "name": "Alice",
      "role": "EDITOR"
    }
  ]
}
```

### Error codes

| Code                     | HTTP Status | Meaning                                   |
| ------------------------ | ----------- | ----------------------------------------- |
| `FORBIDDEN`              | 403         | User is not a member of this organization |
| `ORGANIZATION_NOT_FOUND` | 404         | Organization does not exist               |
