Waitlist API reference

Waitlist API · Waitlist-Variants

post/v1/workspaces/{workspace_id}/waitlists/{waitlist_id}/variantsAuth

Create a variant

A `locale` variant serves its copy to visitors whose `?lang=` or `Accept-Language` matches; `ab` variants of one locale are picked at random by `weight` on each public info read.

Path parameters

workspace_id*string · uuid

Id of the workspace.

waitlist_id*string · uuid

Id of the waitlist.

Headers

Idempotency-Keystring

Idempotency key (24 h). A retry with the same key and body returns the first response instead of creating a second variant.

Request body

kind*object

`locale`: the copy for visitors of one language; `ab`: one arm of a weighted A/B test within a locale.

Example: "locale"

locale*string

BCP-47 locale tag. For ab variants this is the locale they target; for locale variants this is the locale they serve. Case is normalised on the public side.

Example: "en"

copy*object

Copy overrides. Recognised keys: display_name, description, confirmation_message. Unknown keys are dropped on the public render.

Example: {"display_name":"Accès anticipé"}

weightinteger

Relative weight inside the ab pool. Ignored when kind=locale. Default 1.

Example: 1

activeboolean

Whether the variant is served. Default `true`.

Example: true

Response · 201 Variant created

id*string · uuid

Variant id.

waitlist_id*string · uuid

The waitlist the variant belongs to.

kind*object

`locale`: the copy for visitors of one language; `ab`: one arm of a weighted A/B test within a locale.

locale*string

BCP-47 locale tag the variant serves or targets.

copy*object

Copy overrides by key: `display_name`, `description`, `confirmation_message` (only the keys that were set).

Example: {"display_name":"Accès anticipé"}

weight*integer

Relative weight inside the A/B pool (ignored for `locale`).

active*boolean

Whether the variant is served.

created_at*string · date-time

When the variant was created.

Example

Request

POST https://api.waitlist.productcraft.co/v1/workspaces/{workspace_id}/waitlists/{waitlist_id}/variants
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "kind": "locale",
  "locale": "en",
  "copy": {
    "display_name": "Accès anticipé"
  },
  "weight": 1,
  "active": true
}

Response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "waitlist_id": "00000000-0000-0000-0000-000000000000",
  "kind": {},
  "locale": "string",
  "copy": {
    "display_name": "Accès anticipé"
  },
  "weight": 0,
  "active": false,
  "created_at": "2026-01-01T00:00:00.000Z"
}