✨ MoEngage NEXT Spring 2026 — The Future of Engagement is Agentic. Join us on April 28. Register now
curl --request POST \
--url https://api-{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": "testuser@moengage.com",
"template_id": "123123123",
"template_name": "Test",
"template_version": "1"
}
}
'{
"external_template_id": "d05a44f0-a7cf-471a-bcb6-63054800a367"
}This API creates a new On-Site Messaging (OSM) template. You can use this API to upload templates created outside the MoEngage ecosystem to MoEngage and use them for campaign creation.
curl --request POST \
--url https://api-{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": "testuser@moengage.com",
"template_id": "123123123",
"template_name": "Test",
"template_version": "1"
}
}
'{
"external_template_id": "d05a44f0-a7cf-471a-bcb6-63054800a367"
}Documentation Index
Fetch the complete documentation index at: https://moengage-crashes-in-debug-feedback.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.
For more information on authentication and getting your credentials, refer here.
The details of the OSM template to be created.
Template created successfully.
The unique ID assigned to the newly created template by MoEngage. This ID is used for subsequent updates or searches.
Was this page helpful?