FlaresendDocs
Templates

List templates

The project's stored templates, followed by the built-in templates they don't replace.

GET/v1/templatesAPI key

Returns every template you can send with in one response, not paginated:

  1. Templates stored in the project (source: "db"), sorted by name.
  2. Then the built-in templates (source: "git"), except those a stored template with the same name replaces.

Built-in templates are read-only. In this list they have id: null, version: null, an empty subject and html: null. Retrieve one by name to see it rendered with example data.

Response

dataTemplate[]

The templates. The Node.js client returns this array directly.

Show template properties
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 name to pass as template when sending.

subjectstring

The subject, unrendered. Empty for built-in templates in this list.

htmlstring | null

The HTML, unrendered. null for built-in templates in this list.

textstring | null

The text body, or null.

variablesVariable[]

{ name, required, example } for each variable. For built-in templates, one entry per top-level data field, with required: false and the value from the template's example data.

versionnumber | null

The current version. null for built-in templates.

createdAtstring | null

null for built-in templates.

updatedAtstring | null

null for built-in templates.