Create a CMS message

Prev Next
Post
/cmsMessages/create

Required: name, templateId. encoding is one of UTF-8, ISO-8859-1 or ISO-8859-15. variables holds design variables (colors, sizes, links), not recipient data, as a JSON object serialized as a string. Each key maps to a definition: id, name, type (text, list or toggle), value (always a string), group, order and inline ("true" or "false" as a string); list adds options (label to value), toggle adds trueValue and falseValue. Content refers to a variable as $.

Query parameters
templateId
integer (int64) Required

The numeric ID of the template to create the message from.

Body parameters

The message.

Expand All
object
name
string
description
string
tags
string
externalId
string
encoding
string
imageHandlingMode
string
Valid values[ "host", "inline", "none" ]
subject
string
lifecycleStatus
string
Valid values[ "ACTIVE", "ARCHIVED" ]
preventRssSendout
boolean
Defaultfalse
fallbackContent
string
groupId
integer (int64)
messageCategoryId
integer (int64)
variables
string
blocks
Array of object (BlockInstance)
object
blockInstanceId
string
blockId
integer (int64)
name
string
description
string
content
string
renderedContent
string
variables
string
autoUpdate
boolean
Defaultfalse
encoding
string
Responses
200

The created message.

Example response:

{
  "id": 29692,
  "name": "November newsletter - DE",
  "description": "German edition",
  "tags": "newsletter,de",
  "externalId": "nl-2026-11-de",
  "encoding": "UTF-8",
  "imageHandlingMode": "host",
  "content": "<html><body><div data-block-area=\"main\"><p style=\"background-color: ${defaultBGColor}\">Welcome to our newsletter</p></div></body></html>",
  "rendered": false,
  "subject": "Our November news",
  "template": {
    "id": 9168,
    "name": "November newsletter",
    "lifecycleStatus": "ACTIVE"
  },
  "status": "WORKINPROGRESS",
  "preventRssSendout": false,
  "lifecycleStatus": "ACTIVE",
  "blocks": [
    {
      "blockInstanceId": "9405-910974664242449-396925382327620",
      "blockId": 9405,
      "name": "Welcome text",
      "description": "Greeting used in onboarding mails",
      "content": "<p style=\"background-color: ${defaultBGColor}\">Welcome to our newsletter</p>",
      "renderedContent": null,
      "variables": "{\"BLOCKVAR_9405-910974664242449-396925382327620_buttonColor_ENDBLOCKVAR\": {\"id\": \"325a8b38-e9aa-47f4-a47b-f0300e837fec\", \"name\": \"Button Colour\", \"type\": \"text\", \"value\": \"#0055AA\", \"group\": \"Button\", \"order\": 1, \"inline\": \"false\"}}",
      "autoUpdate": false,
      "encoding": "UTF-8"
    }
  ],
  "variables": "{\"defaultBGColor\": {\"id\": \"def-bgColor\", \"name\": \"Default Background Color\", \"type\": \"text\", \"value\": \"#FFFFFF\", \"group\": \"System Defaults\", \"order\": 1, \"inline\": \"false\"}, \"imagetype\": {\"id\": \"314f6ef8-37df-470a-beea-6b630832df29\", \"name\": \"Image Link Settings\", \"type\": \"list\", \"value\": \"withlink\", \"options\": {\"Image w/ URL\": \"withlink\", \"Image w/o URL\": \"nolink\"}, \"group\": \"Variables\", \"order\": 2, \"inline\": \"false\"}}",
  "fallbackContent": "Our November news. View this email in your browser.",
  "groupId": 300,
  "messageCategoryId": 12,
  "createDate": 1792998000000,
  "modifyDate": 1793001600000,
  "version": 3
}
Expand All
object
id
integer (int64)
name
string
description
string
tags
string
externalId
string
encoding
string
imageHandlingMode
string
Valid values[ "host", "inline", "none" ]
content
string
rendered
boolean
Defaultfalse
subject
string
template
object (TemplateSummary)
id
integer (int64)
name
string
lifecycleStatus
string
Valid values[ "ACTIVE", "ARCHIVED" ]
status
string
Valid values[ "FINISHED", "WORKINPROGRESS" ]
preventRssSendout
boolean
Defaultfalse
lifecycleStatus
string
Valid values[ "ACTIVE", "ARCHIVED" ]
blocks
Array of object (BlockInstance)
object
blockInstanceId
string
blockId
integer (int64)
name
string
description
string
content
string
renderedContent
string
variables
string
autoUpdate
boolean
Defaultfalse
encoding
string
variables
string
fallbackContent
string
groupId
integer (int64)
messageCategoryId
integer (int64)
createDate
integer (int64)
modifyDate
integer (int64)
version
integer (int32)
400

Error. All errors are returned as HTTP 400; errorCode in the body says what went wrong: INVALID_PARAMETER or MISSING_PARAMETER (a parameter is missing or invalid), NO_SUCH_OBJECT (no object with this ID in your account), PERMISSION_DENIED (your user lacks the CMS permission for this action), UNEXPECTED_ERROR (backend error). Example: {"errorActor": "CLIENT", "errorCode": "NO_SUCH_OBJECT", "message": "...", "objectType": null, "propertyName": null, "propertyValue": null}