# createManagerLink

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

## Operation

| Method | URL |
|---|---|
| POST | https://api.thomas.co/v1/manager-links |

| Field | Value |
|---|---|
| operationId | createManagerLink |
| method | POST |
| server | https://api.thomas.co/v1 |
| path | /manager-links |
| tags | `Manager Links` |
| summary | Create manager link |
| badges | `{"name":"Admin"}`, `{"name":"Owner"}` |

## Request Parameters

None.

## Request Body

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

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 201 | Manager link created | #/components/schemas/ManagerLinkResponseDto |
| 400 | Manager cannot link to themselves (IDENTITY_MANAGER_SELF_LINK) or invalid payload | #/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 | Manager or report individual not found | #/components/schemas/ApiErrorResponseDto |
| 409 | Manager link already exists (IDENTITY_MANAGER_LINK_DUPLICATE) | #/components/schemas/ApiErrorResponseDto |

## Artifact Examples

### Response 400 example

```json
{
  "statusCode": 400,
  "message": "A manager cannot link to themselves",
  "error": "IDENTITY_MANAGER_SELF_LINK"
}
```

### 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": "Manager or report individual not found",
  "error": "IDENTITY_COMPANY_INDIVIDUAL_NOT_FOUND"
}
```

### Response 409 example

```json
{
  "statusCode": 409,
  "message": "Manager link already exists",
  "error": "IDENTITY_MANAGER_LINK_DUPLICATE"
}
```
