Skip to main content
POST
/
custom-templates
/
osm
Create OSM Template
curl --request POST \
  --url https://api-0{dc}.moengage.com/v1.0/custom-templates/osm \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "basic_details": {
    "payload": "<html><body><h1>Your HTML Content Here</h1></body></html>",
    "template_type": "BANNER"
  },
  "meta_info": {
    "created_by": "[email protected]",
    "template_id": "123123123",
    "template_name": "Test",
    "template_version": "1"
  }
}
'
{
  "external_template_id": "d05a44f0-a7cf-471a-bcb6-63054800a367"
}
API templates cannot be used in the Drag and Drop Editor in the MoEngage Dashboard. They are only supported for the Custom HTML Editor.

Rate Limit

The rate limit is 100 RPM. You can upload a maximum of 100 templates per minute.

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 OSM template to be created.

basic_details
object
required

Details about the template, including its payload and template type.

meta_info
object
required

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

Response

Template created successfully.

external_template_id
string<uuid>

The unique ID assigned to the newly created template by MoEngage. This ID is used for subsequent updates or searches.