Grant-level templates
Grant-level templates let you create reusable messages with dynamic content. Each template is linked to the grant specified in a Create Template request.
Nylas supports the following templating engines:
We recommend you use mustache }} or Handlebars if you need a simple implementation. If you need more advanced formatting, conditions, or layouts, we recommend Nunjucks or Twig.
GET /v3/grants/{grant_id}/templatesReturns a list of grant-level templates.
POST /v3/grants/{grant_id}/templatesCreates a grant-level template.
GET /v3/grants/{grant_id}/templates/{template_id}Returns the specified grant-level template.
PUT /v3/grants/{grant_id}/templates/{template_id}Updates the specified grant-level template.
DELETE /v3/grants/{grant_id}/templates/{template_id}Deletes the specified grant-level template.
POST /v3/grants/{grant_id}/templates/{template_id}/renderRenders the specified application-level template with the provided variables.
POST /v3/grants/{grant_id}/templates/renderRenders the HTML content of a grant-level template using the provided variables and specified templating engine.