---
title: "Generate email template preview"
method: POST
path: "/email/1/templates/{templateId}/preview"
tags: ["channels", "email", "email-templates"]
---

# Generate email template preview

`POST /email/1/templates/{templateId}/preview`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/email/1/templates/{templateId}/preview`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - HTTP basic

Generates a rendered preview of an email template by replacing placeholders with the provided key-value data.

## Path parameters

- `templateId` integer, required

## Request body `multipart/form-data`

- 39bb6975d36d214ea076d974c69ec0b82edda805f4c6bf36a3f6f7d154c98fa0EmailTemplatePreviewRequest
  - `placeholders` object: A map of placeholder names and their replacement values.

## Response `200`

OK

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
