Documentation

Get Template

Retrieve a single email template.

Production keys can get a test-only template by id (so they can promote it) even though it is omitted from the list.

GET /templates/:template_id
Example: /templates/template_01k3tgwp77e3ztqwwhhykepxq8

Path Parameters

template_id string required

The template ID.

Example

curl -X GET https://api.mailcast.io/v1/templates/:template_id \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Content-Type: application/json"
Response 200
{
  "template_id": "template_01k3tgwp77fra9sr4bfwhe0044",
  "name": "welcome",
  "mjml": "<mjml><mj-body><mj-section><mj-column><mj-text>Hello {{name}}</mj-text></mj-column></mj-section></mj-body></mjml>",
  "from": "hello@example.com",
  "to": null,
  "subject": "Welcome {{name}}",
  "test_only": false,
  "created_at": "2025-08-29T12:00:00Z",
  "updated_at": "2025-08-29T12:00:00Z"
}