---
title: "Render a template with variable substitution"
method: POST
path: "/api/v1/templates/render"
tags: ["Templates"]
---

# Render a template with variable substitution

`POST /api/v1/templates/render`

## Request

- Base URL: `https://api.misar.io/mail`
- URL: `https://api.misar.io/mail/api/v1/templates/render`
- Auth: HTTP bearer

## Request body

- RenderTemplateRequest
  - `template_id` string, uuid, required
  - `variables` object, required

## Response `200`

Rendered template

- RenderTemplateResponse
  - `success` boolean
  - `data` object
    - `subject` string
    - `html` string, nullable
    - `text` string, nullable
    - `templateId` string, uuid
    - `templateName` string
    - `warning` string

## Other responses

- `404`: Template not found

---

[API](https://skmtc.dev/misar/apis/misarmail-api.md) · [All operations](https://skmtc.dev/misar/apis/misarmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/misar/apis/misarmail-api/revisions/1141238bc092?raw)
