# Update an HTML block `PATCH / PUT / POST /api/v1/html-blocks/{id}` Updates an HTML block by ID. ## Permissions Send your API key in `X-API-Key`. Required permissions are **HTML blocks → Write**. ## Path parameters - `id` (integer, required) — ID of the HTML block. ## Body parameters - `name` (string) — Display name of the HTML block, up to 191 characters. - `html` (string) — HTML content. Supply either html or body when creating a block. - `body` (string) — Alias for html. It is used when html is omitted. ## 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/html-blocks/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"html":"

Email office@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/html-blocks/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"html":"

Email office@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/html-blocks/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"html":"

Email office@example.com.

"}' ``` ## Response **200 OK** Returns a successful update response. Example with fictional data and selected fields. ```json { "message_key": "entities.html_block.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.