Skip to content

Create an onboarding A/B test

POST
/api/v1/ux/ab-tests
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.

Media typeapplication/json
OnboardingVariantCreateRequest

Request body for POST /api/v1/ux/ab-tests.

object
drop_off_step_id
Any of:
string
hypothesis
required
Hypothesis
string
min_observations
Min Observations
integer
default: 100
name
required
Name
string
variant_type
required
Variant Type
string
Allowed values: question_order copy default_selections progress_indicator
variants
required
Variants
Array<object>
VariantConfig

Runtime 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.

object
copy_overrides
Copy Overrides
object
key
additional properties
string
defaults
Defaults
object
key
additional properties
any
name
required
Name
string
ordered_step_ids
Ordered Step Ids
Array<string>
progress_indicator_style
Any of:
string

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>
ValidationError
object
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"
}
]
}