# Create an HTML block `POST /api/v1/html-blocks` Creates an HTML block. ## Permissions Send your API key in `X-API-Key`. Required permissions are **HTML blocks → Write**. ## Body parameters - `name` (string, required) — 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 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" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"name":"Club contact details","html":"
Contact the club office.
"}' ``` ## Response **201 Created** The created HTML block is returned in data. Example with fictional data and selected fields. ```json { "message_key": "entities.html_block.messages.created", "data": { "id": 8, "name": "Club contact details", "html": "Contact the club office.
" } } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `422` — One or more fields failed validation.