Templates

Get a template

Get one template by id or alias. The content fields are the current draft; has_unpublished_versions says whether it differs from the published version that sends use. Requires the email:read scope.

get/v1/templates/{id}

Request

  • Base URL: https://smtpfa.st/api
  • URL: https://smtpfa.st/api/v1/templates/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

The template id or alias

Response

The template

objectstring
idstring
current_version_idstring nullable

Id of the published version; null until the first publish.

aliasstring nullable
namestring
status'draft' | 'published'
published_atstring date-time nullable
created_atstring date-time
updated_atstring date-time
fromstring nullable
subjectstring nullable
reply_tostring[] nullable
htmlstring nullable
textstring nullable
has_unpublished_versionsboolean

The draft differs from the published version. Always true before the first publish.

preview_textstring nullable

Not in Resend.

markdownstring nullable

Not in Resend.

categorystring nullable

Not in Resend.

Example response

{
  "object": "template",
  "id": "clx_tpl123",
  "alias": "order-confirmation",
  "name": "order-confirmation",
  "variables": [
    {
      "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
      "key": "PRODUCT"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.