Get Template

Retrieve a single template by ID or alias.

GET/templates/{template_id}

Requires a full_access API key.

Path Parameters

template_idstringrequired

The template ID (UUID) or alias string.

Response Fields

objectstring

Always "template".

idstring

The template ID.

current_version_idstring | null

The current published version ID.

aliasstring | null

The template alias.

namestring

The template name.

statusstring

Template status: "draft" or "published".

published_atstring | null

ISO 8601 timestamp of when the template was last published.

fromstring | null

Default sender email address.

subjectstring | null

Default email subject.

reply_tostring[] | null

Default reply-to email addresses.

htmlstring

HTML content.

textstring | null

Plain text content.

variablesarray

Array of template variable objects. Each item contains id, key, type, fallback_value, created_at, and updated_at.

has_unpublished_versionsboolean

Whether the template has unpublished changes since the last publish.

created_atstring

ISO 8601 timestamp.

updated_atstring

ISO 8601 timestamp.

curl -X GET 'https://api.postflare.app/templates/e5f6a7b8-c9d0-1234-efab-345678901234' \
  -H 'Authorization: Bearer re_xxxxxxxxx'
const response = await fetch(
  'https://api.postflare.app/templates/welcome-email',
  {
    headers: {
      'Authorization': 'Bearer re_xxxxxxxxx',
    },
  }
);

const data = await response.json();

Response

Response
{
  "object": "template",
  "id": "e5f6a7b8-c9d0-1234-efab-345678901234",
  "current_version_id": null,
  "alias": "welcome-email",
  "name": "Welcome Email",
  "status": "draft",
  "published_at": null,
  "from": "Acme <welcome@acme.com>",
  "subject": "Welcome to Acme",
  "reply_to": null,
  "html": "<p>Welcome, {{{FIRST_NAME}}}!</p>",
  "text": null,
  "variables": [],
  "has_unpublished_versions": false,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}