# Endpoints for organizations accessible to the authenticated user

## List accessible organizations

### `GET /v1/orgs`

Returns the list of organizations that the authenticated user has access to. This includes:

- Organizations where the user is a direct member (kind: 'direct')
- Child organizations if the user belongs to a partner organization (kind: 'partnership')
- All active organizations if the user is an Archera staff member (kind: 'staff')

Each organization includes the user's role and membership kind.

### Responses

#### 200 OK

```json
{
  "org_id": "string",  
  "name": "string",  
  "role": "string",  
  "kind": "undefined"
}
```

- `org_id` (string, Required): Unique organization identifier
  - Pattern: `[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\Z`
- `name` (string, Required): Organization name
- `role` (string, Enum, Required): User's role in the organization (e.g., admin, user, support, cloud_rep, restricted_user)
  - Possible values: `user`, `admin`, `support`, `cloud_rep`, `restricted_user`
- `kind` (undefined, Enum, Required): Type of membership: 'direct' (direct member), 'partnership' (via partner org), 'staff' (Archera staff)
  - Possible values: `direct`, `staff`, `partnership`

#### Error Responses

- **400** Bad request
- **401** Unauthorized
- **403** Forbidden
- **404** Not found
- **405** Method not allowed
- **409** Conflict
- **500** Internal server error
- **default** Default error response

### Example Request

```http
GET /v1/orgs HTTP/1.1
Accept: */*
```

### Example Response

```json
[
  {
    "org_id": "text",
    "name": "text",
    "role": "user",
    "kind": "direct"
  }
]
```
