Skip to main content
PUT
/
custom-templates
/
push
Update Push Template
curl --request PUT \
  --url https://api-0{data_center}.moengage.com/v1.0/custom-templates/push \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "external_template_id": "d05a44f0-a7cf-471a-bcb6-63054800a367",
  "update_campaigns": false,
  "ANDROID": {
    "basic_details": {
      "title": "Updated Basic Android Template",
      "message": "Updated Basic Android Template",
      "summary": "Updated Basic Android Template summary",
      "image_url": "",
      "default_click_action": "DEEPLINKING",
      "default_click_action_value": "https://www.google.com"
    },
    "buttons": [
      {
        "btn_name": "btn1",
        "click_action_type": "DEEPLINKING",
        "click_action_name": "btn1",
        "click_action_value": "https://www.google.com"
      }
    ],
    "advanced": {
      "coupon_code": "",
      "icon_type_in_notification": "url",
      "large_icon_url": "https://www.google.com",
      "auto_dismiss_notification": true,
      "dismissal_time_multiplier": "minutes",
      "dismissal_time_value": 5
    }
  },
  "meta_info": {
    "platform": [
      "ANDROID"
    ],
    "template_style": "BASIC",
    "updated_by": "[email protected]",
    "template_name": "Basic Android Template 2",
    "template_version": "2.0"
  }
}
'
{
  "external_template_id": "eca024b7-a8ea-4f31-9154-5b80c85d18a9"
}

Rate Limit

The rate limit is 100 RPM (Requests 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

A JSON object containing the template ID to update, the updated platform payloads, and new metadata.

external_template_id
string<uuid>
required

This field contains the unique identifier that is generated during the creation of the template.

meta_info
object
required

This field contains information about the template being updated, such as the name, the template's platform, style, and the details of the user updating the template.

update_campaigns
boolean
default:false

This field contains a flag that is used to update all the campaigns that are currently using the template being updated to the newer version(that is being updated in this request). The default value for this flag is false.

When the update_campaigns flag is true, all the campaigns running with this template will get updated to the latest version of the template, and when it is false, the new version of the template will be created, but there will be no change made to the template used in the existing campaigns.

ANDROID
object

This field contains the updated definition of the template for the Android platform.

IOS
object

This field contains the updated definition of the template for the iOS platform.

Response

This response is returned when the request is processed successfully.

external_template_id
string<uuid>

This field contains the unique template id corresponding to a successful template updation request.

Example:

"eca024b7-a8ea-4f31-9154-5b80c85d18a9"