# createColleague

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

## Operation

| Method | URL |
|---|---|
| POST | https://staging-api.thomas.co/v1/colleagues |

| Field | Value |
|---|---|
| operationId | createColleague |
| method | POST |
| server | https://staging-api.thomas.co/v1 |
| path | /colleagues |
| tags | `People Administration` |
| summary | Create a colleague profile |
| badges | `{"name":"Admin"}`, `{"name":"Owner"}` |

## Request Parameters

None.

## Request Body

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

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | Archived profile found — reactivation offer returned (classification: "reactivate"); or, for a Partner API client, the existing colleague its reference was linked to (classification: "reconciled") | #/components/schemas/ReactivateColleagueOfferDto, #/components/schemas/ReconciledColleagueResponseDto |
| 201 | Colleague profile created successfully (classification: "created") | #/components/schemas/CreatedColleagueResponseDto |
| 400 | Validation error in request body | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | Insufficient role — admin or owner required (AUTH_INSUFFICIENT_ROLE); for an API client, no active Grant carrying `users:w` on this tenant (AUTH_TENANT_NOT_GRANTED) or not the tenant's active `users` source of record (AUTH_SOURCE_OF_RECORD_REQUIRED) | #/components/schemas/ApiErrorResponseDto |
| 409 | Already an employee of this tenant (DUPLICATE_EMAIL); the supplied reference, email and `hrisId` do not all name the same person (IDENTITY_RESOLUTION_CONFLICT); or this API client already holds a different reference for that employee (PARTNER_EMPLOYEE_REFERENCE_CONFLICT) | #/components/schemas/ApiErrorResponseDto |
| 429 | Rate limit exceeded. | #/components/schemas/ApiErrorResponseDto |

### Response 429 headers

| Name | Description | Schema |
|---|---|---|
| Retry-After | Seconds until the rate-limit block expires before retrying. | {"type":"integer","minimum":0} |
| RateLimit-Limit | Configured request limit for the active rate-limit window. | {"type":"integer"} |
| RateLimit-Remaining | Requests remaining in the active rate-limit window; zero when blocked. | {"type":"integer"} |
| RateLimit-Reset | Seconds until the rate-limit block expires. | {"type":"integer","minimum":0} |

## Artifact Examples

### Response 400 example

```json
{
  "statusCode": 400,
  "message": "Validation failed",
  "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 409 example

```json
{
  "statusCode": 409,
  "message": "A colleague with this email already exists",
  "error": "DUPLICATE_EMAIL"
}
```

### Response 429 example

```json
{
  "statusCode": 429,
  "message": "ThrottlerException: Too Many Requests",
  "error": "HTTP_TOO_MANY_REQUESTS"
}
```
