Skip to main content
PUT
/
content-blocks
Update Content Block
curl --request PUT \
  --url https://api-0{dc}.moengage.com/v1/external/campaigns/content-blocks \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'MOE-APPKEY: <moe-appkey>' \
  --data '
{
  "id": "634fdf4db9c206ba55b8223b",
  "name": "Summer_Sale_Header_Updated",
  "status": "ACTIVE",
  "raw_content": "<h1>Massive Summer Sale!</h1>",
  "content_type": "HTML",
  "updated_by": "[email protected]",
  "content_block_used": []
}
'
{
  "title": "Invalid Field Value",
  "description": "app_key - Some of the field values are invalid: app_key : None",
  "code": "nGpUNpDQ"
}

Authorizations

Authorization
string
header
required

Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.

  • Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
  • Password: Use your API Key, which you can find within the Campaign report/Business events/Custom templates/Catalog API/Inform Report tile.

For more information on authentication and getting your credentials, refer here.

Headers

MOE-APPKEY
string
required

This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).

Body

application/json

The updated details for the content block.

id
string
required

ID of the content block that you want to update

name
string
required

Name of the content block

status
enum<string>
required

Status of the content block - DRAFT/ACTIVE

Available options:
ACTIVE,
DRAFT
raw_content
string
required

Content of the content block

content_type
enum<string>
required

Type of the content block - HTML/ Plain Text

Available options:
HTML,
TEXT
updated_by
string<email>
required

Email id of the user who is creating the content block

content_block_used
string[]
required

In case, you are using nested content blocks, provide the names of the other content blocks used in this content block. If you are not using nested content blocks, you can pass this as an empty array: content_block_used : []

description
string

Description of the content block

tag_ids
string[]

Tags associated to the content block

team_ids
string[]

Teams for which the content block should be available. Passing team id is mandatory if you are using multiple Teams. For more information, refer to Teams.

images_used
string<uri>[]

Images used in content block

Response

Success