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

# Preview template

`POST /api/v1/templates/preview`

## Request

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

Preview a template with sample data before saving, using the project's name and support email.

## 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

- TemplatePreviewRequest: Request body for previewing a template
  - `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.
  - `subject` string
  - `body` string, required
  - `button_text` string
  - `button_url_template` string

## Response `200`

Template preview with validation

- object
  - `preview` object, required
  - `validation_errors` string[], required
  - `is_valid` boolean, 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/b15f506de696?raw)
