Skip to main content
POST
Create version

Authorizations

Authorization
string
header
required

Unkey API key passed as Bearer token

Headers

X-External-User-ID
string
required

External user identifier from the calling system

X-External-User-Email
string<email>

External user email from the calling system

Path Parameters

promotionId
string<uuid>
required

Promotion ID

Body

application/json
fileFormat
enum<string>
required

Content format (text, video, audio, image, pdf, document)

Available options:
text,
video,
audio,
image,
pdf,
document
uploadIds
string<uuid>[]

Upload IDs from the File API. Required for file-based formats (pdf, image, video, etc.). Must be omitted when fileFormat is "text".

content
string

Inline text or HTML content. Required when fileFormat is "text". Must be omitted for file-based formats.

Minimum string length: 1
deadline
string<date-time>

Deadline in ISO 8601 format

caption
string
details
string
type
enum<string>

Promotion type (single, batch, carousel, variations)

Available options:
single,
batch,
carousel,
variations
linkedClaimIds
string<uuid>[]
targetMarketIds
string<uuid>[]
applyToAllTargetMarkets
boolean
metadata
object

Arbitrary key-value pairs stored with the promotion and echoed back in webhook payloads. Max 20 keys. Keys: alphanumeric/underscore/hyphen, max 128 chars. Values: max 1024 chars. Do not store PII, credentials, or sensitive data.

Example:
tags
string[] | null

Tag names to attach to the promotion. Existing tags are reused; unknown names are created. Names are trimmed, and duplicates within one request are ignored. Tags belong to the promotion, so they are shared by all of its versions. Max 20 tags, each up to 255 characters. Names beginning with "Var-" and the name "TESTING" are reserved.

Example:

Response

Version created

promotionId
string<uuid>
required
versionId
string<uuid>
required
version
integer
required

Auto-derived version number

correlationId
string<uuid>
required

Correlation ID for request tracing. Include in support requests.

metadata
object

Stored metadata echoed back for confirmation

tags
string[]

Tag names actually attached, echoed back for confirmation. Empty when tags were requested but could not be attached — the promotion is still created, and the request can be retried by adding the tags separately.