v1

latestOpenAPI 3.0.12026-07-243266138.0 KB
Endpoints

Get a list of templates

This endpoint retrieves a list of available templates stored in eTrusted.

The result set can be filtered by adding request parameters.

get/templates

Query parameters

type'QUESTIONNAIRE' | 'INVITE' | 'REMINDER' | 'DOUBLE_OPT_IN_REVIEW' | 'REVIEW_REPLY'

The template type.

Filter for a specific template type. Existing template types include:

  • QUESTIONNAIRE
  • INVITE
  • REMINDER
  • DOUBLE_OPT_IN_REVIEW
  • REVIEW_REPLY

If you do not set a template filter, the response will contain all templates available to you.

transport'EMAIL' | 'SMS'

the template transport type.

Example:EMAIL

Filter for a specific transport type.

versionstring

Filter for a template specific version. Versions have the format '2.1', with major and minor version numbers.

isGlobalboolean

Filter for global templates.

isDefaultboolean

Filter for default templates.

hasTranslationsboolean

Filter for templates that have translations.

Headers

Authorizationstring required

An OAuth2 authorization header with an access token, see OAuth2

Response

All templates matching the filter settings of the request.

idstring

The unique template ID.

type'QUESTIONNAIRE' | 'INVITE' | 'REMINDER' | 'DOUBLE_OPT_IN_REVIEW' | 'REVIEW_REPLY'

The template type.

namestring

The template name.

versionstring

The template version.

descriptionstring

A description that optionally states what the template is used for.

transportstring

The temmplate transport type.

pathstring

A URL path to the template.

localesstring[]

A list of locales representing the languages the template is available in. Locales must be in glibc locale format.

isGlobalboolean

A flag that reflects whether the template is available to all accounts or not.

isDefaultboolean

A flag that reflects whether the template is a default template.

hasTranslationsboolean

A flag that reflects whether the template has translations or not.

createdAtstring date-time

The date and time when the template was created, in the ISO 8601 and RFC3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ. Check the glossary for examples of valid datetime formats.

updatedAtstring date-time

The date and time when the template was last modified, in the ISO 8601 and RFC3339 compliant format yyyy-MM-dd’T’HH:mm:ss.SSSZ. Check the glossary for examples of valid datetime formats.

Example response

[
  {
    "id": "tmp-xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx",
    "name": "exampleTemplate",
    "version": "2.1",
    "description": "An example description.",
    "transport": "EMAIL",
    "locales": [
      "de_DE",
      "en_GB"
    ],
    "hasTranslations": true,
    "createdAt": "2018-02-01T17:09:41.790Z",
    "updatedAt": "2018-02-01T17:09:41.790Z"
  }
]