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": "[email protected]"
  }
}
'
{
  "external_template_id": "4a1afbc5-4c31-4f19-8c23-793e27af01aa"
}

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 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"