Skip to main content
POST
/
custom-templates
/
inapp
curl --request POST \
  --url https://api-0{dc}.moengage.com/v1.0/custom-templates/inapp \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "basic_details": {
    "payload": "{'jsonKey': 'jsonValue', 'title': 'hello world'}",
    "inapp_template_type": "SELF_HANDLED"
  },
  "meta_info": {
    "created_by": "[email protected]",
    "template_id": "self_handled_123",
    "template_name": "My Self-Handled Template",
    "template_version": "1"
  }
}
EOF
{
  "external_template_id": "4a1afbc5-4c31-4f19-8c23-793e27af01aa"
}
InformationOnly self-handled and HTML template types are supported.

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.

Body

application/json

The details of the In-app template to be created.

basic_details
object
required

This field contains details about the template to be created, including its payload and template type.

meta_info
object
required

This field contains information about the template being created, such as its name, version, and ID and the creator's details.

Response

Template created successfully.

external_template_id
string<uuid>

This field contains the unique ID corresponding to a successful custom template creation. This template ID is used as header input for update, search, or any kind of template modifications in later stage.

Example:

"4a1afbc5-4c31-4f19-8c23-793e27af01aa"