Create an onboarding A/B test
POST
/api/v1/ux/ab-tests
const url = 'https://api.ultimateteam.ai/api/v1/ux/ab-tests';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"drop_off_step_id":"example","hypothesis":"example","min_observations":100,"name":"example","variant_type":"question_order","variants":[{"copy_overrides":{"additionalProperty":"example"},"defaults":{},"name":"example","ordered_step_ids":["example"],"progress_indicator_style":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ultimateteam.ai/api/v1/ux/ab-tests \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "drop_off_step_id": "example", "hypothesis": "example", "min_observations": 100, "name": "example", "variant_type": "question_order", "variants": [ { "copy_overrides": { "additionalProperty": "example" }, "defaults": {}, "name": "example", "ordered_step_ids": [ "example" ], "progress_indicator_style": "example" } ] }'UX-01: Create a new onboarding variant experiment. Rejects variant configs that drop any required compliance step with HTTP 400 COMPLIANCE_VIOLATION.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
OnboardingVariantCreateRequest
Request body for POST /api/v1/ux/ab-tests.
object
hypothesis
required
Hypothesis
string
min_observations
Min Observations
integer
name
required
Name
string
variant_type
required
Variant Type
string
variants
required
Variants
Array<object>
VariantConfigRuntime config payload for one onboarding variant.
The ordered_step_ids list, when present, is validated by the
compliance invariant guard against
:data:src.core.compliance.onboarding_invariants.REQUIRED_COMPLIANCE_STEPS.
A variant with no ordered_step_ids inherits the control
flow unchanged and is never allowed to hide compliance steps.
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
Response Create Onboarding Test Api V1 Ux Ab Tests Post
object
key
additional properties
any
Examplegenerated
{}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}