Skip to main content
GET
/
email-templates
/
{id}
Get Specific Template
curl --request GET \
  --url https://api-{dc}.moengage.com/v2/email-templates/{id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: <content-type>' \
  --header 'MOE-APPKEY: <moe-appkey>'
{
  "status": "success",
  "template_id": "645a0cec10e0307e6d7f7716",
  "template_name": "End_of_season_sale_template",
  "subject": "",
  "template_content": "<!DOCTYPE html><html>...</html>",
  "attachments": [],
  "source": "Partner",
  "sender_name": "Your Brand Name",
  "editor": "Froala Editor",
  "created_date": "2023-05-09 09:05:46.350000",
  "updated_at": "2023-05-09 10:00:57.149000",
  "updated_by": "john.doe@example.com"
}

Rate Limit

The rate limits are at the app level, and a maximum of thousand (sum of all the API requests per app)requests are allowed for an app per minute.

FAQ

What happens when you search for a deleted template? The error description contains the following message in such a case: “Template for given template id is archived”.

Authorizations

Authorization
string
header
required

The API request will be authenticated through Basic Authentication. Basic Authentication sends a Base64-encoded string containing your username and password with every API request.

The username and password details can be obtained from the MoEngage Dashboard. If you're using the API for the first time, follow these steps:

  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 Data tile to copy the API key.
  3. Use these details to authenticate the API requests.

Headers

MOE-APPKEY
string
required

This is your MoEngage account's Workspace ID, which must be passed along with the request. You can find your MoEngage Workspace ID at Settings -> Account -> APIs -> Workspace ID.

Content-Type
enum<string>
required

Set the Content-Type header to application/json.

Available options:
application/json
Authorization
string
required

This authentication parameter, used for access control, must be passed along with the request. To generate the authentication header, refer to Authentication.

Path Parameters

id
string
required

This is the Template id of the template being searched. The template id is a unique identifier that is generated at the time of template creation.

Example:

"63f30792c66ddcaac2ef9109"

Response

This response is returned when the request is processed successfully.

status
string

This field contains the status of the request and denotes whether it was successful or not.

Example:

"success"

template_id
string

This field contains the id of the created template when the request is successful and the error details in case of an unsuccessful request.

Example:

"645a0cec10e0307e6d7f7716"

template_name
string
Example:

"End_of_season_sale_template"

subject
string

subject of the template being fetched

template_content
string

html content of the template

attachments
object[]

The attachments field is a list of JSON Objects that contain the details about an attachment, such as its type, url, name, id, and so on.

source
string

source of the template being fetched

sender_name
string
editor
string
created_date
string

timestamp of template creation

updated_at
string

timestamp of when the template was last updated

updated_by
string

details about who created or updated the template