# transferCompanyOwnership

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

## Operation

| Method | URL |
|---|---|
| POST | https://api.thomas.co/v1/companies/{tenantId}/transfer-ownership |

| Field | Value |
|---|---|
| operationId | transferCompanyOwnership |
| method | POST |
| server | https://api.thomas.co/v1 |
| path | /companies/{tenantId}/transfer-ownership |
| tags | `Roles & Permissions` |
| summary | Transfer ownership |
| badges | `{"name":"Owner"}` |

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| tenantId | path | true | string | Tenant ID of the company |

## Request Body

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

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | Ownership transferred successfully | #/components/schemas/TransferOwnershipResponseDto |
| 400 | Invalid UUID format | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | Insufficient role (admin/owner) or tenant mismatch (IDENTITY_TENANT_MISMATCH) | #/components/schemas/ApiErrorResponseDto |
| 404 | Target company-individual not found | #/components/schemas/ApiErrorResponseDto |
| 422 | Target is archived, already owner, or self-transfer | #/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": "Target company-individual not found",
  "error": "IDENTITY_COMPANY_INDIVIDUAL_NOT_FOUND"
}
```

### Response 422 example

```json
{
  "statusCode": 422,
  "message": "Target is archived, already owner, or self-transfer",
  "error": "IDENTITY_TRANSFER_TARGET_ALREADY_OWNER"
}
```
