Update a CMS block

Prev Next
Put
/cmsBlocks/update

Required: blockId, name. Update is a full replace, not a patch: send every field you want to keep. Fields left out are cleared. This includes content.

Query parameters
blockId
integer (int64) Required

The numeric ID of the block.

autoUpdate
boolean

If true, the change is also written into every placement of this block in existing templates and messages. Defaults to false.

Defaultfalse
Body parameters

The block.

object
name
string
content
string
tags
string
description
string
contentStatus
string
Valid values[ "LOCKED", "UNLOCKED" ]
encoding
string
lifecycleStatus
string
Valid values[ "ACTIVE", "ARCHIVED" ]
folder
string
Responses
200

The updated block.

Example response:

{
  "id": 9405,
  "name": "Welcome text",
  "content": "<p style=\"background-color: ${defaultBGColor}\">Welcome to our newsletter</p>",
  "tags": "welcome,onboarding",
  "type": null,
  "usageArea": "BODY",
  "description": "Greeting used in onboarding mails",
  "contentStatus": "UNLOCKED",
  "encoding": "UTF-8",
  "lifecycleStatus": "ACTIVE",
  "folder": "Onboarding",
  "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\"}}",
  "status": "WORKINPROGRESS",
  "schemaVersion": 1,
  "createDate": 1792998000000,
  "modifyDate": 1793001600000,
  "version": 2,
  "validationCode": "",
  "lastError": null,
  "copiedFromId": null
}
object
id
integer (int64)
name
string
content
string
tags
string
type
string
usageArea
string
description
string
contentStatus
string
Valid values[ "LOCKED", "UNLOCKED" ]
encoding
string
lifecycleStatus
string
Valid values[ "ACTIVE", "ARCHIVED" ]
folder
string
variables
string
status
string
Valid values[ "FINISHED", "WORKINPROGRESS" ]
schemaVersion
integer (int32)
createDate
integer (int64)
modifyDate
integer (int64)
version
integer (int32)
validationCode
string
lastError
string
copiedFromId
integer (int64)
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}