Skip to main content
PATCH

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.

Path Parameters

creativeId
string<cuid2>
required

Creative identifier.

Body

application/json

Changes to a creative. Each top-level field is a group that replaces the stored one as a whole: send the complete content, styling, destination, distribution or schedule you want, and omit a group to leave it untouched. defaultLanguage and languages replace the languages; the stored texts must still fit them, so send content alongside when they no longer do.

content and styling must have the shape of the creative's own type, which never changes; type itself is not accepted. Publish, pause, close and reopen by setting status. Unknown fields are rejected with 400.

name
string
Required string length: 1 - 255
status
enum<string>

The author's intent, and the only status a write sets: draft (never published), inProgress (published), paused (paused by its author) or completed (closed by its author). The same values as a survey's status.

What visitors get is displayStatus, which the server derives from this value, archivedAt, the schedule and the Destination survey. Nothing writes status on its own: a schedule ending or a survey pausing changes displayStatus only.

Available options:
draft,
inProgress,
paused,
completed
defaultLanguage
string

Canonical locale code accepted by v3 survey APIs, for example en-US, de-DE, or zh-Hans-CN.

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

"en-US"

languages
object[]
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. Omit to keep the stored value.

content
object

What a feedback button shows.

styling
object

A feedback button's position and custom styles. The position applies whether or not custom styles are on.

Example:
destination
object

What the creative opens when pressed: a survey or a link. A creative opens exactly one Destination; many creatives may open the same survey.

distribution
object

When the creative shows. showOn: pageView shows it on every page view; showOn: action only when one of triggers fires, and publishing needs at least one. triggers must be empty with pageView. A creative never falls back to every page view. conditions (Show when) narrows either, and displayPercentage (Share of visitors) shows it to that share of visitors, each decided once and kept on every page; null means everyone.

Example:
schedule
object

When a published creative shows, to the minute. Before startAt it is scheduled; from endAt on it is closed. null leaves that side open. endAt must be after startAt, or the write answers 422.

Example:
expectedUpdatedAt
string<date-time>

Optimistic-concurrency precondition: the creative's updatedAt from your last read. The change is applied only if the creative hasn't changed since; otherwise nothing is written and the request answers 409. Omit it to apply the change to the creative as it is stored when the request runs.

Response

Creative updated

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.