# Update a coach `PATCH / PUT / POST /api/v1/coaches/{id}` Updates a coach by ID. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Coaches → 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 coach. ## Body parameters - `firstname` (string or null) — Given name. - `surname` (string or null) — Family name. - `taxcode` (string or null) — Tax identification code. - `email` (string or null) — Contact email. - `phone` (string or null) — Contact phone. - `notes` (string or null) — Profile notes. - `address` (string or null) — Street address. - `city` (string or null) — City of residence. - `province` (string or null) — Province or region of residence. - `zip` (string or null) — Postal code. - `country` (string or null) — Country of residence. - `nationality` (string or null) — Nationality. - `birth_city` (string or null) — Place 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) — Identification document number. - `car_make` (string or null) — Vehicle make. - `car_model` (string or null) — Vehicle model. - `car_plate` (string or null) — Vehicle registration number. - `bank_name` (string or null) — Bank name. - `iban` (string or null) — Bank account IBAN. - `birthday` (integer or null) — Date of birth as Unix seconds. - `to_notify` (boolean or null) — Whether the coach receives notifications. - `privacy_consent` (boolean or null) — Recorded privacy consent. - `privacy_accepted_at` (integer or null) — Consent time in Unix seconds. - `metadata` (map or null) — Additional coach information. Supplying a map replaces the stored metadata. - `archived` (boolean) — Use true to archive this coach or false to reactivate the record. ## 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/coaches/${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 '{"notes":"Available for Saturday sessions."}' ``` ## 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/coaches/${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 '{"notes":"Available for Saturday sessions."}' ``` ## 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/coaches/${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 '{"notes":"Available for Saturday sessions."}' ``` ## Response **200 OK** Returns a successful update response. Example with fictional data and selected fields. ```json { "message_key": "entities.coach.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. - `500` — The coach could not be saved.