# Preview an email template

`POST https://api.cademi.com.br/api/v3/settings/emails/templates/{email_template_id}/previews`

Operation ID: `settings.emails.templates.previews.create` · API v3

Renders an email template with an optional draft `body` and returns the resulting subject and HTML. Nothing is saved, so this operation can be used to review changes before updating the template.

Requires only the `settings.read` permission. The `new_access` template does not support previews.

Required permissions: `settings.read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `email_template_id` | path | string | yes |  |

## Request body

Content type: `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `body` | string or null | no |  |

## Responses

### 200

Returns the rendered preview. The preview is not stored.

Body: `data`: object.

Fields of object:

| Field | Type | Required | Description |
|---|---|---|---|
| `html` | string | no |  |
| `object` | string, one of `email_preview` | no |  |
| `subject` | string | no |  |
| `template_id` | string | no |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The template key is not part of the email template catalog.

Body: Error.

### 409

The template does not support previews.

Body: Error.

Full schema: https://cademi.dev/openapi/v3.json
