---
title: "Render a sample OTP text with code 123456"
method: POST
path: "/api/v1/projects/{projectId}/templates/{locale}/preview"
tags: ["Templates"]
---

# Render a sample OTP text with code 123456

`POST /api/v1/projects/{projectId}/templates/{locale}/preview`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/projects/{projectId}/templates/{locale}/preview`
- Auth: HTTP bearer

## Path parameters

- `projectId` integer, required
- `locale` string, required

## Request body

- PreviewInputBody
  - `app` string: Overrides the project sender name in the sample

## Response `200`

OK

- TemplatePreviewBody
  - `locale` string, required
  - `source` 'default' | 'custom', required
  - `text` string, required

## Other responses

- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
