Skip to content
Skip to main content
POST
/v3/grants/{grant_id}/templates

Create a template

Creates a grant-level template.

NYLAS API KEYACCESS TOKEN

Parameters

Path parameters

grant_id*string

ID of the grant to access. You can also use the email address associated with the grant, or use /me/ to refer to the grant associated with an access token.

Request body

Create template request

body*string

The body content of the template, in HTML format.

Example: "<p>Hello {{user.name}}, your booking has been confirmed.</p>"
enginestring

The templating engine to use.

handlebarsmustachenunjuckstwig
Default: "mustache"
Example: "mustache"
name*string

The name of the template.

Example: "Booking confirmed message"
subject*string

The subject line of the template.

Example: "{{user.name}}, your booking is confirmed!"

Responses

request_id*string

The ID of the request.

data*object

A custom message template.

POSThttps://api.us.nylas.com/v3/grants/nyla%40example.com/templates

Find your API key in the Nylas Dashboard under API Keys in your application settings.

grant_idrequiredstring

ID of the grant to access. You can also use the email address associated with the grant, or use /me/ to refer to the grant associated with an access token.

Loading editor...

Autocomplete and validation come from this endpoint's request schema.