Create an AB test

Create an AB test (draft) on an application.

Required scope: experimentation.ab_tests:create

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Public ID of the resource.

Query Params
fields[]
array of strings

Field selection for token economy: an explicit list of field names to include in the response, or ["*"] for every field. Omit for this endpoint's own default field set.

fields[]
Body Params
ab_test_variants
array of objects
required
length ≥ 2

Variants: [{ vendor_id, weight, position, config, presentable_id }, ...]. At least 2, positions 0..n-1, and weights (1-99 each) summing to 100 are required even when saving a draft.

ab_test_variants*
config
object
string

Existing variant public ID when updating; omit for a new variant.

integer
required
≥ 0

Zero-based position; saving a standalone draft or launching an embedded campaign test requires consecutive positions 0..n-1.

string
required
length ≥ 1

Screen/flow public ID from screens_list, not its vendor_id.

string
required
length ≥ 1

Variant identifier, unique across the application. Use a test-specific prefix.

integer
required
1 to 99

Traffic percent. Saving a standalone draft or launching an embedded campaign test requires 1–99 per variant, summing to 100.

config
object
string

Existing variant public ID when updating; omit for a new variant.

integer
required
≥ 0

Zero-based position; saving a standalone draft or launching an embedded campaign test requires consecutive positions 0..n-1.

string
required
length ≥ 1

Screen/flow public ID from screens_list, not its vendor_id.

string
required
length ≥ 1

Variant identifier, unique across the application. Use a test-specific prefix.

integer
required
1 to 99

Traffic percent. Saving a standalone draft or launching an embedded campaign test requires 1–99 per variant, summing to 100.

string

Audience public ID (aud_… or caud_… or rtaud_…) to target; omit to run against all users.

string

Free-text description of the test.

string
required

Display name shown in console.

placement_ids
array of strings

Placement public IDs (plac_…) this test runs on.

placement_ids
string

USER_INTERFACE or PRICING. Defaults to USER_INTERFACE.

string
required

Stable machine identifier used in SDK calls.

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json