---
title: "Render a template"
method: POST
path: "/v3/grants/{grant_id}/templates/{template_id}/render"
tags: ["Grant-level templates"]
---

# Render a template

`POST /v3/grants/{grant_id}/templates/{template_id}/render`

Renders the specified application-level template with the provided variables.

## Request body

- object
  - `strict` boolean — When `true`, Nylas returns an error if the template contains variables that aren't defined in the `variables` object.
  - `variables` object, required — A set of key/value pairs representing variables to substitute for values in the template.

## Response `200`

Success. Returns rendered template.

- object
  - `request_id` string, required — The ID of the request.
  - `data` object, required
    - `body` string, required — The rendered HTML body content with variables substituted.
    - `subject` string, required — The rendered subject content with variables substituted.

## Other responses

- `400` — Error: Bad request

---

[API](https://skmtc.dev/nylas/apis/nylas-api.md) · [All operations](https://skmtc.dev/nylas/apis/nylas-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nylas/nylas-api/revisions/51c2c1b4ecff/schema)
