curl --request GET \
--url https://api-{dc}.moengage.com/v5/offers/templates/{template_id} \
--header 'Authorization: Basic <encoded-value>'{
"response_id": "resp_5b2f7c1e-3d94-4a68-8e1b-9c0a7d42f6a3",
"type": "template",
"data": {
"id": "promo_banner_demo",
"value": "promo_banner_demo",
"label": "Promo Banner",
"template_config": {
"id": {
"label": "ID",
"outputKeyName": "id",
"value": "",
"isValid": true,
"errorMessage": [],
"dataType": "string",
"validations": {
"REQUIRED": true
}
},
"title": {
"label": "Title",
"outputKeyName": "title",
"value": "Your offer title",
"isValid": true,
"errorMessage": [],
"dataType": "string",
"validations": {
"REQUIRED": true
}
},
"description": {
"label": "Description",
"outputKeyName": "description",
"value": "",
"isValid": true,
"errorMessage": [],
"dataType": "string",
"validations": {}
},
"cta_label": {
"label": "CTA Label",
"outputKeyName": "cta_label",
"value": "Learn more",
"isValid": true,
"errorMessage": [],
"dataType": "string",
"validations": {
"REQUIRED": true
}
},
"cta_url": {
"label": "CTA URL",
"outputKeyName": "cta_url",
"value": "",
"isValid": true,
"errorMessage": [],
"dataType": "string",
"validations": {
"REQUIRED": true
}
},
"cta_target": {
"label": "CTA Target",
"outputKeyName": "cta_target",
"value": "_blank",
"isValid": true,
"errorMessage": [],
"dataType": "dropdown",
"validations": {
"REQUIRED": true
},
"options": [
{
"id": "same_tab",
"value": "_self",
"label": "Same tab"
},
{
"id": "new_tab",
"value": "_blank",
"label": "New tab"
}
]
},
"theme": {
"label": "Theme",
"outputKeyName": "theme",
"value": "light",
"isValid": true,
"errorMessage": [],
"dataType": "dropdown",
"validations": {},
"options": [
{
"id": "light_theme",
"value": "light",
"label": "Light"
},
{
"id": "dark_theme",
"value": "dark",
"label": "Dark"
}
]
}
},
"template_html": "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"><title>Promo Banner</title><style>.promo-banner{padding:24px;text-align:center;font-family:sans-serif}.promo-banner.dark{background:#1a1a1a;color:#fff}.promo-banner .cta{display:inline-block;margin-top:16px}</style></head><body><div class=\"promo-banner ${config.theme.value}\"><h3>${config.title.value}</h3><p>${config.description.value}</p><a class=\"cta\" href=\"${config.cta_url.value}\" target=\"${config.cta_target.value}\">${config.cta_label.value}</a></div></body></html>",
"template_meta": {}
}
}{"code":"ER001","target":"Authentication Invalid","message":"Auth validation failed."}<string>{
"error": {
"code": "TEMPLATE_NOT_FOUND",
"message": "Template not found.",
"target": "offering",
"details": [
{
"code": "TEMPLATE_NOT_FOUND",
"target": "template_id",
"message": "Template not found."
}
],
"doc_url": "https://www.moengage.com/docs/api/offerings/offerings-overview"
},
"response_id": "resp_5b2f7c1e-3d94-4a68-8e1b-9c0a7d42f6a3"
}{
"response_id": "<string>",
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"doc_url": "https://www.moengage.com/docs/api/offerings/offerings-overview",
"target": "<string>",
"details": [
{
"code": "<string>",
"target": "<string>",
"message": "<string>"
}
]
}
}{
"response_id": "<string>",
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"doc_url": "https://www.moengage.com/docs/api/offerings/offerings-overview",
"target": "<string>",
"details": [
{
"code": "<string>",
"target": "<string>",
"message": "<string>"
}
]
}
}<html><body><h1>503 Service Temporarily Unavailable</h1></body></html>Get Offer Template
Retrieve a single personalization template by its ID. The response returns the template’s full field schema — every field, its type, whether it’s required, and the valid options for dropdown fields — along with the template’s preview HTML.
Use this before building template-type offering content: fetch the template to see exactly which fields it needs and what values are valid, then supply those values in Create Offering. To find template IDs, use List Offer Templates.
curl --request GET \
--url https://api-{dc}.moengage.com/v5/offers/templates/{template_id} \
--header 'Authorization: Basic <encoded-value>'{
"response_id": "resp_5b2f7c1e-3d94-4a68-8e1b-9c0a7d42f6a3",
"type": "template",
"data": {
"id": "promo_banner_demo",
"value": "promo_banner_demo",
"label": "Promo Banner",
"template_config": {
"id": {
"label": "ID",
"outputKeyName": "id",
"value": "",
"isValid": true,
"errorMessage": [],
"dataType": "string",
"validations": {
"REQUIRED": true
}
},
"title": {
"label": "Title",
"outputKeyName": "title",
"value": "Your offer title",
"isValid": true,
"errorMessage": [],
"dataType": "string",
"validations": {
"REQUIRED": true
}
},
"description": {
"label": "Description",
"outputKeyName": "description",
"value": "",
"isValid": true,
"errorMessage": [],
"dataType": "string",
"validations": {}
},
"cta_label": {
"label": "CTA Label",
"outputKeyName": "cta_label",
"value": "Learn more",
"isValid": true,
"errorMessage": [],
"dataType": "string",
"validations": {
"REQUIRED": true
}
},
"cta_url": {
"label": "CTA URL",
"outputKeyName": "cta_url",
"value": "",
"isValid": true,
"errorMessage": [],
"dataType": "string",
"validations": {
"REQUIRED": true
}
},
"cta_target": {
"label": "CTA Target",
"outputKeyName": "cta_target",
"value": "_blank",
"isValid": true,
"errorMessage": [],
"dataType": "dropdown",
"validations": {
"REQUIRED": true
},
"options": [
{
"id": "same_tab",
"value": "_self",
"label": "Same tab"
},
{
"id": "new_tab",
"value": "_blank",
"label": "New tab"
}
]
},
"theme": {
"label": "Theme",
"outputKeyName": "theme",
"value": "light",
"isValid": true,
"errorMessage": [],
"dataType": "dropdown",
"validations": {},
"options": [
{
"id": "light_theme",
"value": "light",
"label": "Light"
},
{
"id": "dark_theme",
"value": "dark",
"label": "Dark"
}
]
}
},
"template_html": "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"><title>Promo Banner</title><style>.promo-banner{padding:24px;text-align:center;font-family:sans-serif}.promo-banner.dark{background:#1a1a1a;color:#fff}.promo-banner .cta{display:inline-block;margin-top:16px}</style></head><body><div class=\"promo-banner ${config.theme.value}\"><h3>${config.title.value}</h3><p>${config.description.value}</p><a class=\"cta\" href=\"${config.cta_url.value}\" target=\"${config.cta_target.value}\">${config.cta_label.value}</a></div></body></html>",
"template_meta": {}
}
}{"code":"ER001","target":"Authentication Invalid","message":"Auth validation failed."}<string>{
"error": {
"code": "TEMPLATE_NOT_FOUND",
"message": "Template not found.",
"target": "offering",
"details": [
{
"code": "TEMPLATE_NOT_FOUND",
"target": "template_id",
"message": "Template not found."
}
],
"doc_url": "https://www.moengage.com/docs/api/offerings/offerings-overview"
},
"response_id": "resp_5b2f7c1e-3d94-4a68-8e1b-9c0a7d42f6a3"
}{
"response_id": "<string>",
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"doc_url": "https://www.moengage.com/docs/api/offerings/offerings-overview",
"target": "<string>",
"details": [
{
"code": "<string>",
"target": "<string>",
"message": "<string>"
}
]
}
}{
"response_id": "<string>",
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"doc_url": "https://www.moengage.com/docs/api/offerings/offerings-overview",
"target": "<string>",
"details": [
{
"code": "<string>",
"target": "<string>",
"message": "<string>"
}
]
}
}<html><body><h1>503 Service Temporarily Unavailable</h1></body></html>Authorizations
Send your Workspace ID and API key as a base64-encoded username:password string.
- Username: Your MoEngage Workspace ID (also known as the App ID), from Settings > Account > API keys.
- Password: An API key generated from Settings > Account > API keys. Click + Create new key, set Authentication type to Basic Auth, select the Offerings group, and assign at least the View permission.
Refer to API Key Dashboard for details on creating and managing API keys.
Path Parameters
The ID of the personalization template to retrieve (for example, promo_banner_demo). This is the template's natural key, not a prefixed ObjectId. You can fetch template IDs using the List Offer Templates API.
Response
Template retrieved successfully.
Full detail for a single personalization template.