# Preview a certificate template

`POST https://api.cademi.com.br/api/v3/products/{product_id}/certificate-template/previews`

Operation ID: `certificates.template.previews.create` · API v3

Renders a sample certificate from the product's current certificate template, using placeholder data.

A preview is not an issued certificate: it does not appear in certificate listings or reports and cannot be verified through public validation. The response does not include a `file_id`; use `pdf_url` to access the rendered PDF.

Templates of replicated products cannot be previewed.

Required permissions: `certificates.preview`.

## Parameters

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

## Responses

### 201

Returns the rendered preview.

Body: `data`: CertificatePreview.

Fields of CertificatePreview:

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Public ID of the preview, prefixed with cpv_. |
| `note` | string | yes | Notice stating that the preview is not an issued certificate. |
| `object` | string, one of `certificate_preview` | yes |  |
| `pdf_url` | string | yes | URL of the rendered preview PDF. |

### 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 product was not found or is not accessible with the current credentials.

Body: Error.

### 422

The Idempotency-Key header is missing or invalid.

Body: Error.

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