FlaresendDocs
Templates

Retrieve a template

One template by name. Built-in templates come back rendered with their example data.

GET/v1/templates/{name}API key

Looks the name up the same way a send does: a template stored in the project first, then the built-in templates.

  • A stored template comes back as saved, with its variables unrendered and its current version.
  • A built-in template comes back with subject, html and text rendered from its example data, so you can see what it looks like. id, version and the timestamps are null.

Path parameters

namestringpathrequired

The template name, for example order-shipped or welcome.

Response

idstring | null

tmpl_… for stored templates, null for built-in ones.

source'db' | 'git'

db for stored templates, git for built-in ones.

projectIdstring | null

null for built-in templates.

namestring

The template name.

subjectstring

Stored: the unrendered subject. Built-in: the subject rendered from the example data.

htmlstring | null

Stored: the unrendered HTML. Built-in: the rendered HTML.

textstring | null

Stored: the text body or null. Built-in: the rendered plain text.

variablesVariable[]

{ name, required, example } for each variable.

versionnumber | null

The current version of a stored template. null for built-in ones.

createdAtstring | null

ISO 8601 timestamp, or null for built-in templates.

updatedAtstring | null

ISO 8601 timestamp, or null for built-in templates.

Errors

StatusCodeWhen
404template_not_foundNo stored or built-in template with this name.