/v1/workspaces/{workspace_id}/waitlists/{waitlist_id}/variantsAuthCreate 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 · uuidId of the workspace.
waitlist_id*string · uuidId of the waitlist.
Headers
Idempotency-KeystringIdempotency 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*stringBCP-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*objectCopy overrides. Recognised keys: display_name, description, confirmation_message. Unknown keys are dropped on the public render.
Example: {"display_name":"Accès anticipé"}
weightintegerRelative weight inside the ab pool. Ignored when kind=locale. Default 1.
Example: 1
activebooleanWhether the variant is served. Default `true`.
Example: true
Response · 201 Variant created
id*string · uuidVariant id.
waitlist_id*string · uuidThe 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*stringBCP-47 locale tag the variant serves or targets.
copy*objectCopy overrides by key: `display_name`, `description`, `confirmation_message` (only the keys that were set).
Example: {"display_name":"Accès anticipé"}
weight*integerRelative weight inside the A/B pool (ignored for `locale`).
active*booleanWhether the variant is served.
created_at*string · date-timeWhen 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"
}