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

# Render template

`POST /api/v1/templates/render`

## Request

- Base URL: `https://api.proof.holdings`
- URL: `https://api.proof.holdings/api/v1/templates/render`
- Auth: HTTP bearer

Render a template with provided variables for testing.

## Query parameters

- `profile_id` string: The sub-account (project) whose templates to act on — templates exist only per project. A project-bound API key acts for its own project only; naming another answers `403 profile_mismatch` (SEC-SA-002). An account-wide key or a dashboard session may name any project of the account (`403 profile_not_owned` otherwise). Omitted: the key's project, else the primary project.

## Request body

- TemplateRenderRequest: Request body for rendering a template with variables
  - `channel` 'telegram' | 'whatsapp' | 'sms' | 'email', required: Template messaging channel
  - `message_type` 'verification_request' | 'verification_success' | 'verification_expired' | 'login_request' | 'login_success' | '2fa_request' | '2fa_success' | 'account_deletion_request' | 'account_deletion_success' | 'confirmation_request' | 'confirmation_approved' | 'confirmation_denied', required: Template message type. `account_deletion_request` and `account_deletion_success` are RETIRED: since h-implement-proper-deletion an account is deleted in one step with a 2FA code and no messenger confirmation, so these templates are never sent; they stay accepted so templates stored before the change can still be read and deleted.
  - `variables` object
    - `code` string
    - `expires_in` string
    - `user_identifier` string
    - `callback_url` string

## Response `200`

Rendered template

- object
  - `rendered` object, required

---

[API](https://skmtc.dev/proof/apis/proof-holdings-api.md) · [All operations](https://skmtc.dev/proof/apis/proof-holdings-api/llms.txt) · [OpenAPI document](https://skmtc.dev/proof/apis/proof-holdings-api/revisions/6b8d61ee354f?raw)
