# inviteColleague

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

## Operation

| Method | URL |
|---|---|
| POST | https://api.thomas.co/v1/colleagues/{id}/invite |

| Field | Value |
|---|---|
| operationId | inviteColleague |
| method | POST |
| server | https://api.thomas.co/v1 |
| path | /colleagues/{id}/invite |
| tags | `People Administration` |
| summary | Invite a colleague to activate their account |
| badges | `{"name":"Admin"}`, `{"name":"Owner"}` |

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| id | path | true | string |  |

## Request Body

None.

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 202 | Invitation queued for delivery | #/components/schemas/InviteColleagueResponseDto |
| 400 | Invalid UUID format for id parameter | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | Insufficient role — admin or owner required | #/components/schemas/ApiErrorResponseDto |
| 404 | Company-individual not found (IDENTITY_COMPANY_INDIVIDUAL_NOT_FOUND) | #/components/schemas/ApiErrorResponseDto |
| 422 | Colleague is active (ALREADY_ACTIVE) or archived (COLLEAGUE_ARCHIVED) | #/components/schemas/ApiErrorResponseDto |

## Artifact Examples

### Response 400 example

```json
{
  "statusCode": 400,
  "message": "Validation failed (uuid is expected)",
  "error": "HTTP_BAD_REQUEST"
}
```

### Response 401 example

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

### Response 403 example

```json
{
  "statusCode": 403,
  "message": "Insufficient role privileges",
  "error": "AUTH_INSUFFICIENT_ROLE"
}
```

### Response 404 example

```json
{
  "statusCode": 404,
  "message": "Colleague not found",
  "error": "IDENTITY_COMPANY_INDIVIDUAL_NOT_FOUND"
}
```

### Response 422 example

```json
{
  "statusCode": 422,
  "message": "Colleague is already active",
  "error": "ALREADY_ACTIVE"
}
```
