Get Template
Retrieve a single template by ID or alias.
GET
/templates/{template_id}Requires a full_access API key.
Path Parameters
template_idstringrequiredThe template ID (UUID) or alias string.
Response Fields
objectstringAlways "template".
idstringThe template ID.
current_version_idstring | nullThe current published version ID.
aliasstring | nullThe template alias.
namestringThe template name.
statusstringTemplate status: "draft" or "published".
published_atstring | nullISO 8601 timestamp of when the template was last published.
fromstring | nullDefault sender email address.
subjectstring | nullDefault email subject.
reply_tostring[] | nullDefault reply-to email addresses.
htmlstringHTML content.
textstring | nullPlain text content.
variablesarrayArray of template variable objects. Each item contains id, key, type, fallback_value, created_at, and updated_at.
has_unpublished_versionsbooleanWhether the template has unpublished changes since the last publish.
created_atstringISO 8601 timestamp.
updated_atstringISO 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
{
"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"
}