# Update an athlete `PATCH / PUT / POST /api/v1/athletes/{id}` Updates an athlete by ID. ## 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 - `firstname` (string) — Given name, up to 60 characters. - `surname` (string) — Family name, up to 60 characters. - `birthday` (integer or date string or null) — Date of birth in Unix seconds or YYYY-MM-DD format. - `gender` (string or null) — Use M or F. - `phone` (string or null) — Contact phone. - `email` (string or null) — Valid contact email. - `taxcode` (string or null) — Tax identification code. - `address` (string or null) — Street address. - `zip` (string or null) — Postal code. - `city` (string or null) — City of residence. - `province` (string or null) — Province or region of residence. - `country` (string or null) — Country of residence. - `nationality` (string or null) — Nationality. - `citizenship` (string or null) — Citizenship. - `birth_city` (string or null) — City of birth. - `birth_province` (string or null) — Province or region of birth. - `birth_country` (string or null) — Country of birth. - `id_number` (string or null) — Club registration number. Use a unique value in the sport. - `notes` (string or null) — Athlete notes. - `shirt_number` (integer or null) — Shirt number. - `parent_divorced` (boolean) — Whether the parents are recorded as separated. - `allow_photo` (boolean) — Whether the athlete has given photo permission. - `to_notify` (boolean or null) — Whether the athlete receives notifications. - `privacy_consent` (boolean or null) — Recorded privacy consent. - `privacy_accepted_at` (integer or null) — Consent timestamp as Unix seconds. - `is_injured` (boolean) — Set true to record injury status or false to clear it. The API manages injured_at. - `metadata` (map or null) — Custom fields. Supplying the map replaces the existing metadata. ## Request (PATCH) Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request PATCH \ --url "https://api.asdincloud.com/api/v1/athletes/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"shirt_number":12}' ``` ## Request (PUT) Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request PUT \ --url "https://api.asdincloud.com/api/v1/athletes/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"shirt_number":12}' ``` ## Request (POST) 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}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"shirt_number":12}' ``` ## Response **200 OK** Returns a successful update response. Example with fictional data and selected fields. ```json { "message_key": "entities.athlete.messages.updated" } ``` ## 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.