# Retire an athlete `POST /api/v1/athletes/{id}/retirement` Marks an athlete as retired and optionally terminates their subscriptions. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Athletes → Write**. ## Headers - `X-Sport-Id` (integer, required) — The sport ID from [List sports](/api/sports/list.md). Use the sport the record belongs to. ## Path parameters - `id` (integer, required) — ID of the athlete. ## Body parameters - `subscription_action` (string, required) — Use keep or terminate. Termination also requires Subscriptions → Write. - `balance_action` (string) — When terminating, use keep_due or waive_remaining. Waiving also requires Payments → Write. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request POST \ --url "https://api.asdincloud.com/api/v1/athletes/${ID:?Set ID}/retirement" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"subscription_action":"keep"}' ``` ## Response **200 OK** Returns the updated retirement state, affected subscriptions, amount still due, and number of canceled expected payments. Example with fictional data and selected fields. ```json { "status": "success", "data": { "is_retired": true, "retired_at": 1794564000, "subscriptions_terminated": 0, "residual_amount": 0, "expected_payments_cancelled": 0 } } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `404` — The requested record was not found. - `422` — One or more fields failed validation. - `500` — The retirement could not be saved.