---
title: "Render pre-create ad previews"
method: POST
path: "/v1/ads/preview"
tags: ["Ad Creatives"]
---

# Render pre-create ad previews

`POST /v1/ads/preview`

Renders how a creative would look per placement BEFORE any ad exists, via Meta's
`/generatepreviews`. Provide exactly one creative source: `existingCreativeId` or `creativeSpec`.
Each preview is an HTML `<iframe>` snippet embeddable directly. Unknown `formats` values
return Meta's 400 verbatim.

## Request body

- object
  - `accountId` string, required — Zernio SocialAccount id used to resolve the Meta token.
  - `adAccountId` string, required — Platform ad account id (Meta act_<n>, Google customer id, LinkedIn account id, ...).
  - `formats` string[] — Meta ad_format values, one preview per format. Defaults to [DESKTOP_FEED_STANDARD].
  - `existingCreativeId` string — Preview an existing ad-account creative by id. Mutually exclusive with creativeSpec.
  - `creativeSpec` object — Raw Meta creative spec forwarded verbatim to /generatepreviews. Mutually exclusive with existingCreativeId.

## Response `200`

Rendered previews

- object
  - `previews` object[]
    - `format` string
    - `html` string, nullable — Meta's <iframe> snippet; null when Meta returned no preview for the format.

## Other responses

- `400` — Invalid input, or Meta rejected the creative spec / ad_format; the message carries Meta's error
- `401` — Unauthorized
- `404` — The account or requested resource was not found or is not accessible. An account ID may have been disconnected and removed. Read GET /v1/accounts for current account IDs.
- `409` — The account exists but is inactive or needs reconnection. Reconnect it, then read GET /v1/accounts for its current account ID before retrying. Code: ads_connection_required.
- `429` — Meta rate limit reached
- `501` — Only supported on Meta (facebook/instagram)

## Changes

- **2026-09-16** `3e6ddf2a99ea` — 2 info
  - added the optional property `details/budgetScope` to the response with the `404` status
  - added the optional property `details/budgetScope` to the response with the `409` status
- **2026-09-15** `0dba7d004d75` — 4 info
  - added the optional property `details/quotaExhausted` to the response with the `404` status
  - added the optional property `details/quotaExhausted` to the response with the `409` status
  - added the optional property `details/quotaScope` to the response with the `404` status
  - added the optional property `details/quotaScope` to the response with the `409` status
- **2026-09-10** `e70ed06e7150` — 2 info
  - added the non-success response with the status `404`
  - added the non-success response with the status `409`

[Change history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/ads/preview/post.md)

---

[API](https://skmtc.dev/zernio/apis/zernio-api.md) · [All operations](https://skmtc.dev/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zernio/apis/zernio-api/revisions/be448f13ecdc?raw)
