Skip to main content
PUT
/
custom-templates
/
email
Update Email Template
curl --request PUT \
  --url https://api-0{dc}.moengage.com/v1.0/custom-templates/email \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "external_template_id": "<string>",
  "basic_details": {
    "email_content": "<string>",
    "subject": "<string>",
    "thumbnail_url": "<string>",
    "sender_name": "<string>",
    "attachments": [
      "https://app-cdn.moengage.com/assets/LogoThumbnail.jpg"
    ],
    "preview_text": "<string>"
  },
  "meta_info": {
    "template_id": "<string>",
    "template_name": "<string>",
    "template_version": "<string>",
    "created_by": "<string>",
    "locale": "<string>",
    "variation": 123,
    "group_id": "<string>"
  },
  "update_campaigns": true,
  "update_latest_version": true
}
'
{
"external_template_id": "d05a44f0-a7cf-471a-bcb6-63054800a367"
}

Rate Limit

The rate limit is 100 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 Data tile.

For more information on authentication and getting your credentials, refer here.

Body

application/json
external_template_id
string
required

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

basic_details
object
required
meta_info
object
required
update_campaigns
boolean

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.

update_latest_version
boolean

If the value is "true," this API does not create a new version of the template but only updates its contents.

Response

This response is returned when the request is processed successfully.

external_template_id
string

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