Blocks
Create a block
Creates a block. The HTML and plain text are validated, including Liquid syntax and the customer attributes they use.
post/blocks
Request
- Base URLhttps://api5.optimove.net/content/v1
- URLhttps://api5.optimove.net/content/v1/blocks
- AuthAPI key in header X-API-KEY
Request body
Example request
{
"tagName": "summer-sale-banner",
"name": "Summer sale banner",
"html": "<div>Hi {{customer.FirstName}}, our summer sale has started.</div>",
"plaintext": "Hi {{customer.FirstName}}, our summer sale has started.",
"editorType": "html",
"code": {
"header": "{% assign greeting = \"Hello\" %}"
}
}Response
The block was created.
Example response
{
"tagName": "summer-sale-banner",
"name": "Summer sale banner",
"html": "<div>Hi {{customer.FirstName}}, our summer sale has started.</div>",
"plaintext": "Hi {{customer.FirstName}}, our summer sale has started.",
"editorType": "html",
"code": {
"header": "{% assign greeting = \"Hello\" %}"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.