Create a block

Creates a block. The HTML and plain text are validated, including Liquid syntax and the customer attributes they use.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
length between 1 and 250

Tag name that templates use to reference the block. Must be unique.

string
required
length between 1 and 200

Display name of the block. Must be unique among the tenant's blocks.

uuid | null

Folder to put the block in. Leave it out for the root folder. Must be an existing folder.

string | null

Free-text description of the block.

string
required
length ≥ 1

HTML content of the block. Can contain Liquid personalization tags.

string
required
length ≥ 1

Plain-text version of the content.

string | null

Editor state as a serialized string. Required when isSavedRow is true.

string
enum
required

Editor the block is built with:

  • html: HTML code editor
  • visual: drag-and-drop editor
Allowed:
boolean
Defaults to true

Whether the plain-text version is generated from the HTML.

boolean
Defaults to false

Whether the block is available as a saved row in the visual editor. Allowed only when editorType is visual and editorData is set.

code
object | null

Custom code of the block.

Responses

401

The X-API-KEY header is missing or the API key is not valid.

403

The API key doesn't have the admin role, or the tenant isn't allowed to change this block.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*