curl --request PUT \
--url https://api-{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": "Massive Summer Sale!",
"updated_by": "[email protected]",
"content_block_used": []
}
'{
"error": "Invalid Field Value",
"message": "app_key - Some of the field values are invalid: app_key : None",
"details": "nGpUNpDQ"
}{
"error": "Duplicate Label",
"message": "label - A content block with this label already exists in the workspace: label : summer_sale_header_2025",
"details": "dPQnUgNp"
}{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server.",
"details": "SRV_ERR_123"
}Update Content Block
This API updates the content blocks in MoEngage.
curl --request PUT \
--url https://api-{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": "Massive Summer Sale!",
"updated_by": "[email protected]",
"content_block_used": []
}
'{
"error": "Invalid Field Value",
"message": "app_key - Some of the field values are invalid: app_key : None",
"details": "nGpUNpDQ"
}{
"error": "Duplicate Label",
"message": "label - A content block with this label already exists in the workspace: label : summer_sale_header_2025",
"details": "dPQnUgNp"
}{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server.",
"details": "SRV_ERR_123"
}承認
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.
ヘッダー
ボディ
The updated details for the content block.
Teams for which the content block should be available. Passing team id is mandatory if you are using multiple Teams.
Pass the internal team ID (for example, 69fb3d7d66ea00bdb35da08e), not the team's display name. For more information, refer to Teams.
Structured JSON representation of the content block's content, as used by the drag-and-drop builder on the MoEngage dashboard.
This field is optional and currently populated by the MoEngage dashboard for content blocks built visually. It is not required when creating a content block via this API using raw_content.
レスポンス
Success. The response body is empty.