# switchOrganisation

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| POST | https://api.thomas.co/v1/auth/session/switch-org |

| Field | Value |
|---|---|
| operationId | switchOrganisation |
| method | POST |
| server | https://api.thomas.co/v1 |
| path | /auth/session/switch-org |
| tags | `Authentication` |
| summary | Switch organisation |
| badges | None |

## Request Parameters

None.

## Request Body

| Content type | Schema refs |
|---|---|
| application/json | #/components/schemas/SwitchOrgRequestDto |

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | Organisation switched, new session issued | #/components/schemas/SessionResponseDto |
| 400 | Already in this organisation | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | Not a member of the target organisation (AUTH_ORG_NOT_MEMBER) | #/components/schemas/ApiErrorResponseDto |

## Artifact Examples

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```
