Skip to navigation

Create an experiment

View as Markdown

Create an experiment across committed versions of one agent. Then create a campaign that runs it — see Create Experiment Campaign.

Path parameters

org_idstringRequired
workspace_idstringRequired

Headers

X-API-KeystringRequired
Your workspace API key.

Request

This endpoint expects an object.
namestringRequiredformat: "^[\w\- ]{1,50}$"<=50 characters

A/B test name. Letters, digits, spaces, hyphens, and underscores. Max 50 characters.

variantslist of objectsRequired

Two to five variants. traffic_percentage must sum to 100. Each variant uses a different committed version of the same agent.

descriptionstring or nullOptional<=150 characters
Optional description. Max 150 characters.
app_typeenumOptionalDefaults to agent
Must be agent.
Allowed values:

Response

Successful Response
experiment_idstring

Id to pass as app_config.experiment_id when creating a campaign.

namestring
app_typeenum
Allowed values:
variantslist of objects
created_bystring
created_atdatetime
updated_atdatetime
descriptionstring or nullOptional
updated_bystring or nullOptional

Errors

422
Unprocessable Entity Error