Experiment

Creates an experiment in the draft state and returns the full document.

The split salt is generated server-side. Returns 409 with code experiment_key_exists when the key is already taken.

post/campaign/experiments

Request body

keystring required

Stable unique identifier; becomes the analysis key exp:<key>.

descriptionstring required

Human-readable description of the hypothesis.

userEnrollment'perSession' | 'sticky' nullable

Defaults to perSession.

startAtstring date-time nullable

Start of the experiment window.

endAtstring date-time nullable

End of the experiment window.

Response

OK

idstring required

The unique id of the experiment document.

keystring required

Stable unique identifier; the analysis key is exp:<key>.

descriptionstring required

Human-readable description of the hypothesis.

state'draft' | 'active' | 'paused' | 'completed' required
userEnrollment'perSession' | 'sticky' required
startAtstring date-time nullable

Outside the [startAt, endAt) window the experiment is treated as inactive.

endAtstring date-time nullable

End of the experiment window; the experiment auto-completes afterwards.

createdBystring required

The email of the admin who created the experiment.

createdAtstring date-time required

When the experiment was created.

updatedAtstring date-time required

When the experiment was last changed.

Changes

Changed in 1 of the 7 revisions of this API.1