v1

latestOpenAPI 3.0.32026-07-26120117318.1 KB
Experiments

Create an experiment

Creates a new experiment. Returns 201 with the created experiment and Location header.

post/experiments

Request body

namestring required

Experiment display name.

alias_idstring required

Stable identifier for the experiment. Alphanumeric, hyphens, underscores, dots. Max 64 characters.

descriptionstring

Optional experiment description.

segment_percentnumber nullable

Percentage of users to include in the experiment.

primary_metricstring nullable

Primary success metric.

goal_valuenumber nullable

Target value for the primary metric.

goal_directionstring nullable

Desired direction of change.

context_keystring

Context key for context-specific experiments.

is_context_specificboolean

Whether this experiment is restricted to a specific context.

Response

Experiment created.

objectstring
idstring

Experiment identifier (server-generated UID).

urlstring

Canonical API path.

namestring

Experiment display name.

alias_idstring

User-facing stable identifier (supplied on POST, immutable after). Added in the DEV-777 response audit; was missing from the public envelope despite being accepted on create.

descriptionstring

Experiment description.

statusstring

Current experiment status.

started_atstring date-time nullable

ISO 8601 timestamp when the experiment was started.

finished_atstring date-time nullable

ISO 8601 timestamp when the experiment was finished.

segment_percentnumber nullable

Percentage of users included in the experiment.

primary_metricstring nullable

Primary success metric. Legacy experiments created before the underscore naming may return hyphenated variants (e.g. user-to-trial, subscription-cancellation); treat them as read-only and migrate to the underscore form before sending them back on PATCH.

goal_valuenumber nullable

Target value for the primary metric.

goal_directionstring nullable

Desired direction of change for the primary metric.

context_keystring

Context key for context-specific experiments.

is_context_specificboolean

Whether this experiment is restricted to a specific context.

created_atstring date-time

ISO 8601 creation timestamp.

updated_atstring date-time

ISO 8601 last update timestamp.

Example response

{
  "object": "experiment",
  "alias_id": "paywall_ab_test_v3"
}