---
title: "Render a template"
method: POST
path: "/accounts/email-template-render"
tags: ["Email Templates"]
---

# Render a template

`POST /accounts/email-template-render`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/accounts/email-template-render`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/docs/accounts/email-template-render/post.ts> (a function with typed inputs; its response is checked against the schema)

Renders one version the way a send would. A send refuses on unresolved tags.

## Request body

- RenderEmailTemplateRequest
  - `key` string, required
  - `version` 'draft' | 'published': Defaults to the draft when there is one, else the published version
  - `data` object: Values for the tags. Without it the stored sample data is used.

## Response `200`

Success

- object
  - `data` RenderedEmailTemplate, required
    - `version` string
    - `subject` string
    - `html` string
    - `text` string
    - `unresolved` string[]: Tags the data did not answer. A send refuses on them.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found

## Changes

- **2026-11-12** `700eb1ace61a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/changes/accounts/email-template-render/post.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/revisions/700eb1ace61a?raw)
