experiments

Create Experiment

Create a new experiment.

post/api/v1/experiments/

Request body

namestring required

The name of the experiment

descriptionstring nullable

The hypothesis under test

target_idinteger required

The channel target being split

Example request

{
  "name": "Shorter greeting",
  "variants": [
    {
      "name": "b",
      "weight": 50,
      "agent_id": 1
    }
  ],
  "target_id": 1
}

Response

Successful Response

idinteger required

The internal ID of the experiment

namestring required

The name of the experiment

target_idinteger nullable required

The channel target being split, or null if that target has since been deleted. A running experiment always has one.

descriptionstring nullable

The hypothesis under test

status'draft' | 'running' | 'stopped' required

Status of an experiment.

The column is a varchar and not a database enum, so a new value here does not need a migration.

started_atstring date-time nullable

When the experiment started

stopped_atstring date-time nullable

When the experiment stopped

created_atstring date-time required

When the experiment was created

updated_atstring date-time required

When the experiment was last written

last_updated_bystring required

Who last wrote it

Example response

{
  "id": 1,
  "name": "Shorter greeting",
  "target_id": 1,
  "variants": [
    {
      "id": 1,
      "name": "b",
      "weight": 50,
      "agent_id": 1,
      "agent_name": "Front desk"
    }
  ],
  "target": {
    "id": 1,
    "target": "+19995551234",
    "channel_id": 1,
    "channel_name": "Main line"
  }
}

Changes

Changed in 2 of the 144 revisions of this API.2

Of the 144 revisions, 1 has no diff computed.