Application-level templates

Create a template

Creates an application-level template.

post/v3/templates

Request body

bodystring required

The body content of the template, in HTML format.

engine'handlebars' | 'mustache' | 'nunjucks' | 'twig'

The templating engine to use.

namestring required

The name of the template.

subjectstring required

The subject line of the template.

Example request

{
  "body": "<p>Hello {{user.name}}, your booking has been confirmed.</p>",
  "engine": "mustache",
  "name": "Booking confirmed message",
  "subject": "{{user.name}}, your booking is confirmed!"
}

Response

Success. Returns template.

request_idstring required

The ID of the request.

Example response

{
  "data": {
    "app_id": "6c45fe5e-0bb6-41b9-9acc-ccb15bfc51eb",
    "body": "<p>Hello {{user.name}}, your booking has been confirmed.</p>",
    "created_at": 1640995200,
    "engine": "mustache",
    "grant_id": "6c45fe5e-0bb6-41b9-9acc-ccb15bfc51eb",
    "id": "b79c82b2-a51b-4c54-8469-28006a43551a",
    "name": "Booking confirmed message",
    "object": "template",
    "subject": "{{user.name}}, your booking is confirmed!",
    "updated_at": 1640995200
  }
}

Changes