Skip to main content
POST
Create a personalization slot

Authorizations

Authorization
string
header
required

Dashboard JWT token from Clerk

Headers

Idempotency-Key
string

Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.

Required string length: 1 - 255
X-Test-Mode
enum<string>

Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Available options:
true,
false

Body

application/json
slot
string
required

Slot key the SDK asks for on the page — lowercase letters, digits, hyphen or underscore.

Required string length: 1 - 100
Pattern: ^[a-z0-9-_]+$
content
string
required

Markup or text rendered into the slot (up to 5,000 characters). Formatting HTML only — scripts, iframes and inline event handlers are rejected.

Required string length: 1 - 5000
segment_label
enum<string> | null

Audience segment this variant targets. Leave null for the default content shown to everyone else.

Available options:
champion,
high_value_engaged,
engaged,
new,
passive,
at_risk,
dormant,
lost,
null
cta_url
string | null

Destination the call to action links to (http or https), if any.

Maximum string length: 500
cta_text
string | null

Label for the call-to-action button or link.

Maximum string length: 200
variant
string | null

Variant name for A/B testing (for example b). Report on it with the slot lift endpoint.

Maximum string length: 50
priority
integer

Tie-breaker when several variants match the same visitor — highest wins. Defaults to 0.

Required range: 0 <= x <= 100
active
boolean

Whether the SDK may serve this variant. Defaults to true.

metadata
object | null

Free-form key/value data stored alongside the variant.

Response

The created slot variant, with its assigned id and timestamps.

The created slot variant, with its assigned id and timestamps.

data
object
meta
object