# Update an event type `PATCH / PUT / POST /api/v1/event-types/{id}` Updates an event type by ID. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Events → Write**. ## Path parameters - `id` (integer, required) — ID of the event type. ## Body parameters - `name` (string, required) — Name of the event type, up to 120 characters. Must be unique among active types. ## 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/event-types/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"name":"Team practice"}' ``` ## 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/event-types/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"name":"Team practice"}' ``` ## 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/event-types/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"name":"Team practice"}' ``` ## Response **200 OK** Returns a successful update response. Example with fictional data and selected fields. ```json { "status": "success", "data": { "id": 8, "name": "Team practice", "sort_order": 2, "archived_at": null } } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `404` — The requested record was not found. - `400` — The name is missing, invalid, or already used by an active event type.