Skip to main content
POST

承認

Authorization
string
header
必須

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.

ヘッダー

MOE-APPKEY
string
必須

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).

ボディ

application/json

The details of the content block to be created.

name
string
必須

Name of the content block

label
string
必須

Label to uniquely identify your content block

raw_content
string
必須

Content of the content block. ContentApi.* Jinja calls are not supported in raw_content. Using them will cause the request to fail with a 400 error.

content_type
enum<string>
必須

Type of the content block - HTML/ Plain Text

利用可能なオプション:
HTML,
TEXT
created_by
string<email>
必須

Email id of the user who is creating the content block

status
enum<string>

Shows the status of the content block

利用可能なオプション:
ACTIVE,
DRAFT
description
string

Description of the content block

tag_ids
string[]

Tags associated with 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. Pass the internal team ID (for example, 69fb3d7d66ea00bdb35da08e), not the team's display name. For more information, refer to Teams.

content_block_used
string[]

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 : []

images_used
object

An image referenced within the content block.

source
enum<string>

Communication type for the content block. Supported values are:

  • CAMPAIGNS: Creates a content block for use in MoEngage campaigns.
  • INFORM: Creates a content block for use in Inform alerts. You cannot change the communication type after the content block is created.
利用可能なオプション:
CAMPAIGNS,
INFORM
content_json
object

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. To retrieve the ID of the newly created content block, use the Search Content Blocks API.