For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get Email Template (Experimental)

Returns a single email template in a data envelope.

get
Authorizations
Api-TokenstringRequired

API token in Api-Token header

Path parameters
template_idinteger · int64Required

Email template ID

Example: 60927
Responses
200

OK.

application/json
get/api/templates/{template_id}
curl -X GET "https://mailtrap.io/api/templates/{template_id}" \
  -H "Api-Token: YOUR_API_KEY"
{
  "data": {
    "id": 26730,
    "uuid": "018dd5e3-f6d2-7c00-8f9b-e5c3f2d8a132",
    "name": "My Email Template",
    "subject": "Promotional Email",
    "category": "Promotional",
    "body_html": "<div>Template Body</div>",
    "body_text": "Template Body",
    "created_at": "2021-01-01T00:00:00Z",
    "updated_at": "2021-01-01T00:00:00Z"
  }
}

Last updated

Was this helpful?