Retrieve template

Get a template by id or alias, including its draft and publishing status.

GEThttps://api.cresca.xyz/api/v1/templates/:id

Requires a full-access key.

Path parameters

idstringrequired

The template id or alias.

Example

Request
curl -X GET 'https://api.cresca.xyz/api/v1/templates/password-reset' \
  -H 'Authorization: Bearer cr_live_xxxxxxxxx'
Response 200
{
  "object": "template",
  "id": "6713b1f4c2a94e0012ab34cd",
  "name": "Password reset",
  "alias": "password-reset",
  "subject": "Reset your password",
  "from": "Acme <hello@acme.com>",
  "reply_to": null,
  "preview_text": "The link expires in 1 hour.",
  "html": "<p>Hi {{{NAME}}},</p><p><a href=\"{{{RESET_LINK}}}\">Reset your password</a>.</p>",
  "text": null,
  "variables": [
    {
      "key": "NAME",
      "type": "string",
      "fallback_value": "there"
    },
    {
      "key": "RESET_LINK",
      "type": "string",
      "fallback_value": null
    }
  ],
  "status": "published",
  "version": 2,
  "published_at": "2026-10-19T08:30:00.000Z",
  "created_at": "2026-10-18T16:02:11.000Z",
  "updated_at": "2026-10-19T08:30:00.000Z"
}

html, subject and the other content fields show the current draft. status is draft until the first publish, then published; version is the published version that sends use.