# scheduleOrganisationOffboarding

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

## Operation

| Method | URL |
|---|---|
| POST | https://api.thomas.co/v1/org-offboarding/{companyIndividualId}/erase |

| Field | Value |
|---|---|
| operationId | scheduleOrganisationOffboarding |
| method | POST |
| server | https://api.thomas.co/v1 |
| path | /org-offboarding/{companyIndividualId}/erase |
| tags | `Offboarding` |
| summary | Schedule erasure (org offboarding) for a member |
| badges | `{"name":"Admin"}`, `{"name":"Owner"}` |

## Request Parameters

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

## Request Body

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

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 202 | The scheduled erasure timer | #/components/schemas/OrgOffboardingResponseDto |
| 400 | Malformed companyIndividualId or invalid payload | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | Admin or owner role required | #/components/schemas/ApiErrorResponseDto |
| 404 | Missing / cross-tenant / tombstoned target (ORG_OFFBOARDING_TARGET_NOT_FOUND) | #/components/schemas/ApiErrorResponseDto |
| 409 | A concurrent timer-deletion race (ORG_OFFBOARDING_CONFLICT) | #/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": "Offboarding target not found",
  "error": "ORG_OFFBOARDING_TARGET_NOT_FOUND"
}
```

### Response 409 example

```json
{
  "statusCode": 409,
  "message": "Offboarding timer conflict",
  "error": "ORG_OFFBOARDING_CONFLICT"
}
```
