> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apostra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Start creative session

> Generate a reviewable creative draft gallery for a campaign

> [!WARNING]
>
> **Deprecated.** This page documents the v2 buyer API, which is closed to new API
> clients and switches off on 1 December 2026. Use V3 instead: see [Move a v2 buyer
> REST integration to V3](https://docs.apostra.com/v3/migrate-from-v2-rest.md). The conversion endpoint,
> [Log event](https://docs.apostra.com/v2/buyer/event-sources/tasks/log-event.md), stays open.

`POST /api/v2/buyer/campaigns/{campaignId}/creative-sessions`

Starts a reviewable creative session and returns draft variants for the campaign.
Use the session to compare directions, refine one, evaluate it, and finalize the
approved output as a campaign Creative.

## Request

| Field | Type | Required | Notes |
| - | - | - | - |
| `storefrontId` | number | No | Connected creative-provider storefront when the engine requires one. Omit it for a buyer-provided model key. |
| `providerType` | string | Yes | Creative provider to use. |
| `request` | object | Yes | Provider-neutral creative request, including the brief and target format when needed. |
| `prompt` | string | No | Buyer-facing creative direction. |
| `language` | string | No | Supported BCP-47 language for generated audio: English, Dutch, Spanish, or Portuguese, such as `es` or `pt-BR`. Omit it to preserve the existing language selection. |

For an AudioStack session, set `language` when the buyer specifies the spoken
language. It generates the script and AudioStack speech in that language; it
is not a translation request for other creative modalities.

```json theme={null}
{
  "storefrontId": 1725,
  "providerType": "audiostack",
  "language": "pt-BR",
  "prompt": "Create a 30-second audio ad for the new collection.",
  "request": {
    "format_kind": "audio_hosted",
    "params": { "duration_ms_exact": 30000 },
    "creative_brief": {
      "prompt": "A warm introduction to the new collection."
    }
  }
}
```

Returns `201 Created` with the creative session, including its draft variants
and creative plan.

## Meta platform preview (internal testing only)

`POST /api/v2/buyer/campaigns/{campaignId}/creative-sessions/{sessionId}/variants/{variantId}/platform-previews`

Send `{ "placement": "facebook_feed" }` or `{ "placement": "instagram_feed" }`
to render an unsaved Meta image-post draft through the buyer's connected Meta
account. The response returns one `platform_previews` entry with either a
trusted Meta URL and expiry time, or an unavailable reason.

This endpoint is currently limited to Apostra internal test accounts. Other
accounts receive `preview_not_enabled_for_account` and their draft is not sent
to Meta. The endpoint creates no Meta objects or spend. It caches an identical
draft and placement and allows at most 30 fresh previews per Meta ad account
each hour.

### What a Meta preview sends

When this internal-only preview is enabled for an account, Apostra sends Meta a
read-only request through that buyer's own Meta connection. It includes the
selected ad account and requested placement, plus the creative manifest: format
metadata, the brand reference, the Page (and Instagram identity for an
Instagram preview), the draft's primary text, headline, description, call to
action and landing URL, and a link to the draft image. Meta fetches that image
from the link. A generated variant sends its generated image's link. A composer
draft sends a signed read of the chosen Library image, made for that preview
after the account and advertiser are checked, which expires after 15 minutes. The request does not create a creative,
ad, image, or campaign, and it does not spend money or publish anything. The
same creative is sent to Meta when the buyer later chooses to run it. Apostra
documents what it sends; it does not claim what Meta retains after receiving
those inputs.

Unavailable responses use these closed reasons:
`preview_not_enabled_for_account`, `placement_not_supported`, `not_connected`,
`page_not_authorized`, `instagram_identity_missing`, `asset_not_public`,
`meta_rate_limited`, `meta_unavailable`, `preview_service_unavailable`,
`hourly_limit_reached`, and `unexpected_link`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.