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": "test@example.com", "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

The API request is authenticated through Basic Authentication. Follow the steps below to obtain the username and password from the MoEngage Dashboard:

  1. Navigate to Settings > Account > APIs.
  2. Copy the following details:
    • Username: Under Workspace ID (earlier App ID), click the copy icon to copy the username.
    • Password: In the API keys section, click the copy icon in the Campaign report/Business events/Custom templates/Catalog API tile to copy the API key.

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"