# Update a director `PATCH / PUT / POST /api/v1/directors/{id}` Updates a director by ID. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Directors → Write**. ## Headers - `X-Sport-Id` (integer, required) — Supply a valid sport ID from [List sports](/api/sports/list.md) as the request context. ## Path parameters - `id` (integer, required) — ID of the director. ## Body parameters - `firstname` (string) — Given name, up to 60 characters. - `surname` (string) — Family name, up to 60 characters. - `email` (string or null) — Contact email. - `phone` (string or null) — Contact phone. - `birthday` (integer or null) — Date of birth as Unix seconds. - `taxcode` (string or null) — Tax identification code. - `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. - `nationality` (string or null) — Nationality. - `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. - `notes` (string or null) — Notes about the director. - `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. - `to_notify` (boolean) — Whether to send notifications to this director. - `privacy_consent` (boolean or null) — Recorded privacy consent. - `privacy_accepted_at` (integer or null) — Consent timestamp in Unix seconds. - `metadata` (map or null) — Additional fields. Sending metadata replaces the existing map. - `archived` (boolean) — Use true to archive the director or false to restore the record. When supplying a name field, use a non-empty value. ## 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/directors/${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 '{"email":"director@example.com"}' ``` ## 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/directors/${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 '{"email":"director@example.com"}' ``` ## 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/directors/${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 '{"email":"director@example.com"}' ``` ## Response **200 OK** Returns a successful update response. Example with fictional data and selected fields. ```json { "message_key": "entities.director.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.