# recoverPartnerTenant

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

## Operation

| Method | URL |
|---|---|
| POST | https://cxi-api-prod-weu-interim-eraffmdbdmdmbdfz.a01.azurefd.net/v1/tenants/{tenantId}/recover |

| Field | Value |
|---|---|
| operationId | recoverPartnerTenant |
| method | POST |
| server | https://cxi-api-prod-weu-interim-eraffmdbdmdmbdfz.a01.azurefd.net/v1 |
| path | /tenants/{tenantId}/recover |
| tags | `Partner Tenants` |
| summary | Recover a withdrawn customer tenant |
| badges | None |

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| tenantId | path | true | string:uuid | The immutable Customer/Tenant identity (`Company.id`) this operation acts on — the same UUID `POST /v1/tenants` returned when this API client created it. |
| Idempotency-Key | header | true | string | An opaque client-generated key, 1-255 visible ASCII characters excluding comma. Repeating a request with the same key is safe. |

## Request Body

None.

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | The Tenant was restored. An identical retry returns this same body without repeating any lifecycle effect. | #/components/schemas/PartnerTenantRecoveredOutcomeDto |
| 400 | The idempotency header or the path parameter failed validation | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | Only a provisioned Partner-owned API client may call this operation | #/components/schemas/ApiErrorResponseDto |
| 409 | Idempotency state, this tenant’s recovery eligibility, or the Partner cap | #/components/schemas/ApiErrorResponseDto |
| 429 | The per-Credential business rate limit was exceeded (60 requests per minute). | #/components/schemas/ApiErrorResponseDto |

### Response 409 headers

| Name | Description | Schema |
|---|---|---|
| Retry-After | Present as `1` only when an equivalent idempotent request is in progress | {"type":"string","example":"1"} |

### 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 — IDEMPOTENCY_KEY_INVALID

```json
{
  "statusCode": 400,
  "message": "Exactly one valid Idempotency-Key header is required",
  "error": "IDEMPOTENCY_KEY_INVALID"
}
```

### Response 400 example — HTTP_BAD_REQUEST

```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": "API client is not permitted to call this operation",
  "error": "PRINCIPAL_TYPE_NOT_ALLOWED"
}
```

### Response 409 example — PARTNER_TENANT_RECOVERY_NOT_ELIGIBLE

```json
{
  "statusCode": 409,
  "message": "This tenant is not eligible for partner recovery",
  "error": "PARTNER_TENANT_RECOVERY_NOT_ELIGIBLE"
}
```

### Response 409 example — PARTNER_TENANT_CAP_REACHED

```json
{
  "statusCode": 409,
  "message": "This partner has reached its limit of partner-created tenants",
  "error": "PARTNER_TENANT_CAP_REACHED"
}
```

### Response 409 example — IDEMPOTENCY_KEY_REUSED

```json
{
  "statusCode": 409,
  "message": "This Idempotency-Key was already used for a different request",
  "error": "IDEMPOTENCY_KEY_REUSED"
}
```

### Response 409 example — IDEMPOTENCY_REQUEST_IN_PROGRESS

```json
{
  "statusCode": 409,
  "message": "An equivalent request is already in progress",
  "error": "IDEMPOTENCY_REQUEST_IN_PROGRESS"
}
```

### Response 429 example

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