# Retire withdrawal destination

Source: https://business-api-docs.youhodler.com/docs/api/reference/withdrawal-destinations/withdrawal-destinations-retire

Changes withdrawal destination state. The `rail_class` query parameter is required so edge can route directly to the selected backend. Fiat state changes also require `account_ref`. The `Idempotency-Key` header is required: fiat state changes reject requests without it; the crypto path accepts and ignores it.

## Request

**Request URL — POST**
```http
POST /withdrawal-destinations/{destination_id}/retire
```

## Responses

**201 Resource created successfully**

Resource created successfully.

```json
{
  "asset": "USDC",
  "created_at": "2026-05-01T10:00:00Z",
  "crypto_routing": {
    "asset": "USDC",
    "destination": {
      "address": "0xAbCd1234567890AbCd1234567890AbCd12345678",
      "memo": null
    },
    "label": "My ETH wallet",
    "network": "ethereum"
  },
  "fiat_routing": null,
  "id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
  "label": "My ETH wallet",
  "rail_class": "crypto",
  "scope_ref": "clients/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
  "status": "active",
  "updated_at": "2026-05-01T10:00:00Z"
}
```

**400 Invalid request payload**

Invalid request payload, query, or parameter shape.

```json
{
  "code": "invalid_request",
  "message": "The request is invalid (e.g. missing required field or unsupported rail)."
}
```

**401 Caller is not authenticated or the bearer token is invalid**

Caller is not authenticated or the bearer token is invalid.

```json
{
  "code": "unauthorized",
  "message": "Authentication required."
}
```

**403 Caller lacks the required capability or permitted scope**

Caller lacks the required capability or permitted scope.

```json
{
  "code": "forbidden_capability_scope",
  "message": "Insufficient capability for this operation."
}
```

**404 Resource not found**

Resource not found.

```json
{
  "code": "resource_not_found",
  "message": "The withdrawal destination was not found."
}
```

**409 State conflict — the request cannot be applied to the current resource state**

State conflict — the request cannot be applied to the current resource state.

```json
{
  "code": "state_conflict",
  "message": "The destination is in a conflicting state for this operation."
}
```

**422 Operation is not admissible — it violates a business rule**

Operation is not admissible — it violates a business rule, policy constraint, or lifecycle precondition specific to this resource.

```json
{
  "code": "not_admissible",
  "details": {
    "reason": "not_admissible"
  },
  "message": "The operation is not admissible in the current state."
}
```

**429 Request rate limit exceeded**

Request rate limit exceeded. Retry after the delay indicated in the `details.retry_after_ms` field.

```json
{
  "code": "rate_limited",
  "details": {
    "retry_after_ms": 5000
  },
  "message": "Too many requests."
}
```

**502 Upstream service returned an unexpected error**

Upstream service returned an unexpected error.

```json
{
  "code": "upstream_error",
  "message": "An upstream service returned an unexpected error."
}
```

**503 Service is temporarily unavailable**

Service is temporarily unavailable; retry with backoff.

```json
{
  "code": "temporarily_unavailable",
  "message": "The rail or provider is temporarily unavailable."
}
```

**Related endpoints:**

- `POST` [Disable withdrawal destination](/docs/api/reference/withdrawal-destinations/withdrawal-destinations-disable) — Disable before retiring
- `GET` [List withdrawal destinations](/docs/api/reference/withdrawal-destinations/withdrawal-destinations-list) — List remaining active destinations
