Skip to main content
PUT
/
custom-templates
/
inapp
Update In-app Template
curl --request PUT \
  --url https://api-0{dc}.moengage.com/v1.0/custom-templates/inapp \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "external_template_id": "4a1afbc5-4c31-4f19-8c23-793e27af01aa",
  "update_campaigns": false,
  "basic_details": {
    "payload": "<html><body><h1>Hello Updated World!</h1></body></html>",
    "inapp_template_type": "INAPP_HTML"
  },
  "meta_info": {
    "template_name": "My Updated HTML Promo",
    "updated_by": "jane.doe@example.com"
  }
}
'
{
  "external_template_id": "4a1afbc5-4c31-4f19-8c23-793e27af01aa"
}

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 updated details for the In-app template.

external_template_id
string<uuid>
required

The external template ID needs to be updated. This field contains the unique identifier that is generated during the creation of the template.

basic_details
object
required

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

meta_info
object
required

This field will update template information, such as the name of the template and the update's details.

update_campaigns
boolean
default:false

This field contains a flag used to update all campaigns currently using the template to the newer version. When true, all running campaigns with this template will be updated. When false, no change will be made to the template used in existing campaigns.

Response

Template updated successfully.

external_template_id
string<uuid>

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

Example:

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