Skip to main content
POST
/
experiments
/
{experiment_id}
/
status
Change experiment status
curl --request POST \
  --url https://api.qonversion.io/v4/experiments/{experiment_id}/status \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "draft"
}
'
{
  "object": "experiment",
  "id": "<string>",
  "url": "<string>",
  "name": "<string>",
  "description": "<string>",
  "status": "<string>",
  "started_at": "2023-11-07T05:31:56Z",
  "finished_at": "2023-11-07T05:31:56Z",
  "segment_percent": 123,
  "primary_metric": "<string>",
  "goal_value": 123,
  "goal_direction": "<string>",
  "context_key": "<string>",
  "is_context_specific": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication using the project Secret Key (prefixed with sk_, or test_sk_ for sandbox). All v4 public endpoints require the Secret Key — see Authentication. Never expose the Secret Key in client-side code.

Path Parameters

experiment_id
string
required

Experiment identifier.

Maximum string length: 256
Pattern: ^[a-zA-Z0-9._-]+$

Body

application/json
status
enum<string>
required

New experiment status.

Available options:
draft,
active,
paused,
finished

Response

Updated experiment with new status.

object
string
Example:

"experiment"

id
string

Experiment identifier.

url
string

Canonical API path.

name
string

Experiment display name.

description
string

Experiment description.

status
string

Current experiment status.

started_at
string<date-time> | null

ISO 8601 timestamp when the experiment was started.

finished_at
string<date-time> | null

ISO 8601 timestamp when the experiment was finished.

segment_percent
number | null

Percentage of users included in the experiment.

primary_metric
string | null

Primary success metric.

goal_value
number | null

Target value for the primary metric.

goal_direction
string | null

Desired direction of change for the primary metric.

context_key
string

Context key for context-specific experiments.

is_context_specific
boolean

Whether this experiment is restricted to a specific context.

created_at
string<date-time>

ISO 8601 creation timestamp.

updated_at
string<date-time>

ISO 8601 last update timestamp.