---
title: "Preview template by hash"
method: POST
path: "/api/v1/templates/preview/{hash}"
tags: ["templates"]
---

# Preview template by hash

`POST /api/v1/templates/preview/{hash}`

## Request

- Base URL: `https://demo.invoiceninja.com`
- URL: `https://demo.invoiceninja.com/api/v1/templates/preview/{hash}`
- Auth: none declared. Required headers: `X-API-TOKEN`, `X-Requested-With`
- TypeScript: <https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/docs/api/v1/templates/preview/:hash/post.ts> (a function with typed inputs; its response is checked against the schema)

Returns a template preview for the given hash

## Path parameters

- `hash` string, required

## Headers

- `X-API-TOKEN` string, required
- `X-Requested-With` string, required

## Request body

- object

## Response `200`

Template preview response

## Other responses

- `401`: Authentication error
- `403`: Authorization error
- `422`: Validation error
- `default`: Unexpected Error

## Changes

- **2026-02-09** `c85938f55efd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/changes/api/v1/templates/preview/:hash/post.md)

---

[API](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference.md) - [All operations](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/revisions/bcda1f823746?raw)
