Skip to main content
POST

Authorizations

next-auth.session-token
string
cookie
required

NextAuth session JWT cookie. Development: often next-auth.session-token. Production (HTTPS): often __Secure-next-auth.session-token. Send the cookie your browser receives after sign-in.

Body

application/json

A new creative. type selects the content and styling shape and can never change afterwards. Unknown fields are rejected with 400.

workspaceId
string<cuid2>
required

Workspace to create the creative in. Requires read/write access.

name
string
required
Required string length: 1 - 255
type
enum<string>
required

The kind of creative, which fixes its content and styling shape. A feedbackButton is a tab on an edge of the page that always opens its Destination; a banner is a bar across the top or bottom of the page with a message and an optional button. Fixed at creation: it can never change.

Available options:
feedbackButton
content
object
required

What a feedback button shows.

status
enum<string>
default:draft

The author's status (see CreativeStatus). Omit to create a draft. Any other value publishes the creative straight away, so it must meet the publish rules (see POST /api/v3/creatives).

Available options:
draft,
inProgress,
paused,
completed
defaultLanguage
string
default:en-US

The language every text map must hold, as a canonical locale code.

Pattern: ^[a-z]{2}(?:-[A-Z][a-z]{3})?-[A-Z]{2}$
languages
object[]

Other languages the texts are written in. Omit for none.

Maximum array length: 50
autoSelectLanguage
boolean | null

Show the texts in the visitor's browser language when the site sets none with setLanguage and it matches the default or an enabled language; otherwise the default language is used. null (never chosen) and false both mean off.

destination
object

Omit or null for none.

distribution
object

Omit to show on every page view, to everyone, with no conditions.

Example:
schedule
object

Omit for no start or end time.

Example:
styling
object

Omit for the right edge at 50 % (centred top to bottom) on every device, with custom styles off (the workspace Look & Feel).

Example:

Response

Creative created

data
object
required

A creative: a page element the web SDK renders on the customer's site next to surveys, with its own content, look, display rules and schedule. type selects the content and styling shape: switch on it.

The writable groups are name, status, defaultLanguage with languages, autoSelectLanguage, content, styling, destination, distribution and schedule; a PATCH replaces each group it sends as a whole. displayStatus, displayStatusReason, warnings, the timestamps, creator and destination.opensAs are read-only.