Skip to main content
POST
/
experiments
/
{id}
cURL
curl -X POST https://api.growthbook.io/api/v1/experiments/exp_1234 \
  -d '{ "name": "test_experiment", "owner": "weijie.ou@example.com", ... }' \
  -u secret_abc123DEF456:
{
  "experiment": {
    "id": "<string>",
    "trackingKey": "<string>",
    "dateCreated": "2023-11-07T05:31:56Z",
    "dateUpdated": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "type": "standard",
    "project": "<string>",
    "hypothesis": "<string>",
    "description": "<string>",
    "tags": [
      "<string>"
    ],
    "owner": "<unknown>",
    "archived": true,
    "status": "<string>",
    "autoRefresh": true,
    "hashAttribute": "<string>",
    "hashVersion": 1,
    "variations": [
      {
        "variationId": "<string>",
        "key": "<string>",
        "name": "<string>",
        "description": "<string>",
        "screenshots": [
          "<string>"
        ]
      }
    ],
    "phases": [
      {
        "name": "<string>",
        "dateStarted": "<string>",
        "dateEnded": "<string>",
        "reasonForStopping": "<string>",
        "seed": "<string>",
        "coverage": 123,
        "trafficSplit": [
          {
            "variationId": "<string>",
            "weight": 123
          }
        ],
        "targetingCondition": "<string>",
        "namespace": {
          "namespaceId": "<string>",
          "range": "<array>"
        },
        "prerequisites": [
          {
            "id": "<string>",
            "condition": "<string>"
          }
        ],
        "savedGroupTargeting": [
          {
            "matchType": "all",
            "savedGroups": [
              "<string>"
            ]
          }
        ]
      }
    ],
    "settings": {
      "datasourceId": "<string>",
      "assignmentQueryId": "<string>",
      "experimentId": "<string>",
      "segmentId": "<string>",
      "queryFilter": "<string>",
      "inProgressConversions": "include",
      "attributionModel": "firstExposure",
      "statsEngine": "bayesian",
      "goals": [
        {
          "metricId": "<string>",
          "overrides": {
            "delayHours": 123,
            "windowHours": 123,
            "window": "conversion",
            "winRiskThreshold": 123,
            "loseRiskThreshold": 123,
            "properPriorOverride": true,
            "properPriorEnabled": true,
            "properPriorMean": 123,
            "properPriorStdDev": 123,
            "regressionAdjustmentOverride": true,
            "regressionAdjustmentEnabled": true,
            "regressionAdjustmentDays": 123
          }
        }
      ],
      "secondaryMetrics": [
        {
          "metricId": "<string>",
          "overrides": {
            "delayHours": 123,
            "windowHours": 123,
            "window": "conversion",
            "winRiskThreshold": 123,
            "loseRiskThreshold": 123,
            "properPriorOverride": true,
            "properPriorEnabled": true,
            "properPriorMean": 123,
            "properPriorStdDev": 123,
            "regressionAdjustmentOverride": true,
            "regressionAdjustmentEnabled": true,
            "regressionAdjustmentDays": 123
          }
        }
      ],
      "guardrails": [
        {
          "metricId": "<string>",
          "overrides": {
            "delayHours": 123,
            "windowHours": 123,
            "window": "conversion",
            "winRiskThreshold": 123,
            "loseRiskThreshold": 123,
            "properPriorOverride": true,
            "properPriorEnabled": true,
            "properPriorMean": 123,
            "properPriorStdDev": 123,
            "regressionAdjustmentOverride": true,
            "regressionAdjustmentEnabled": true,
            "regressionAdjustmentDays": 123
          }
        }
      ],
      "lookbackOverride": {
        "type": "date",
        "value": 123,
        "valueUnit": "minutes"
      },
      "regressionAdjustmentEnabled": true,
      "sequentialTestingEnabled": true,
      "sequentialTestingTuningParameter": 123,
      "postStratificationEnabled": true,
      "decisionFrameworkSettings": {
        "decisionCriteriaId": "<string>",
        "decisionFrameworkMetricOverrides": [
          {
            "id": "<string>",
            "targetMDE": 123
          }
        ]
      },
      "metricOverrides": [
        {
          "id": "<string>",
          "windowType": "conversion",
          "windowHours": 123,
          "delayHours": 123,
          "properPriorOverride": true,
          "properPriorEnabled": true,
          "properPriorMean": 123,
          "properPriorStdDev": 123,
          "regressionAdjustmentOverride": true,
          "regressionAdjustmentEnabled": true,
          "regressionAdjustmentDays": 123
        }
      ],
      "activationMetric": {
        "metricId": "<string>",
        "overrides": {
          "delayHours": 123,
          "windowHours": 123,
          "window": "conversion",
          "winRiskThreshold": 123,
          "loseRiskThreshold": 123,
          "properPriorOverride": true,
          "properPriorEnabled": true,
          "properPriorMean": 123,
          "properPriorStdDev": 123,
          "regressionAdjustmentOverride": true,
          "regressionAdjustmentEnabled": true,
          "regressionAdjustmentDays": 123
        }
      }
    },
    "fallbackAttribute": "<string>",
    "disableStickyBucketing": true,
    "bucketVersion": 123,
    "minBucketVersion": 123,
    "resultSummary": {
      "status": "<string>",
      "winner": "<string>",
      "conclusions": "<string>",
      "releasedVariationId": "<string>",
      "excludeFromPayload": true
    },
    "shareLevel": "public",
    "publicUrl": "<string>",
    "banditScheduleValue": 123,
    "banditScheduleUnit": "days",
    "banditBurnInValue": 123,
    "banditBurnInUnit": "days",
    "banditConversionWindowValue": 123,
    "banditConversionWindowUnit": "days",
    "linkedFeatures": [
      "<string>"
    ],
    "hasVisualChangesets": true,
    "hasURLRedirects": true,
    "customFields": {},
    "customMetricSlices": [
      {
        "slices": [
          {
            "column": "<string>",
            "levels": [
              "<string>"
            ]
          }
        ]
      }
    ],
    "defaultDashboardId": "<string>",
    "templateId": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://growthbook-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

If using Bearer auth, pass the Secret Key as the token:

curl https://api.growthbook.io/api/v1 \
-H "Authorization: Bearer secret_abc123DEF456"

Path Parameters

id
string
required

The id of the requested resource

Body

application/json
datasourceId
string

Can only be set if existing experiment does not have a datasource

assignmentQueryId
string
trackingKey
string
bypassDuplicateKeyCheck
boolean

If true, allow updating the tracking key even if another experiment with the same tracking key already exists

name
string

Name of the experiment

type
enum<string>
Available options:
standard,
multi-armed-bandit
project
string

Project ID which the experiment belongs to

hypothesis
string

Hypothesis of the experiment

description
string

Description of the experiment

tags
string[]
metrics
string[]
secondaryMetrics
string[]
guardrailMetrics
string[]
activationMetric
string

Users must convert on this metric before being included

segmentId
string

Only users in this segment will be included

queryFilter
string

WHERE clause to add to the default experiment query

owner
any
archived
boolean
status
enum<string>
Available options:
draft,
running,
stopped
autoRefresh
boolean
hashAttribute
string
fallbackAttribute
string
hashVersion
enum<number>
Available options:
1,
2
disableStickyBucketing
boolean
bucketVersion
number
minBucketVersion
number
results
enum<string>

The result status of the experiment. Maps to resultSummary.status in the GET response.

Available options:
dnf,
won,
lost,
inconclusive
winner
number

The index of the winning variation (0-indexed). Maps to resultSummary.winner (variation ID) in the GET response.

analysis
string

Analysis summary or conclusions for the experiment. Maps to resultSummary.conclusions in the GET response.

releasedVariationId
string

The ID of the released variation. Maps to resultSummary.releasedVariationId in the GET response.

excludeFromPayload
boolean

If true, the experiment is excluded from the SDK payload. Maps to resultSummary.excludeFromPayload in the GET response.

inProgressConversions
enum<string>
Available options:
loose,
strict
attributionModel
enum<string>

Setting attribution model to "experimentDuration" is the same as selecting "Ignore Conversion Windows" for the Conversion Window Override. Setting it to "lookbackOverride" requires a lookbackOverride object to be provided.

Available options:
firstExposure,
experimentDuration,
lookbackOverride
lookbackOverride
object

Controls the lookback override for the experiment. For type "window", value must be a non-negative number and valueUnit is required.

statsEngine
enum<string>
Available options:
bayesian,
frequentist
variations
object[]
Minimum array length: 2
phases
object[]
regressionAdjustmentEnabled
boolean

Controls whether regression adjustment (CUPED) is enabled for experiment analyses

sequentialTestingEnabled
boolean

Only applicable to frequentist analyses

sequentialTestingTuningParameter
number
shareLevel
enum<string>
Available options:
public,
organization
banditScheduleValue
number
banditScheduleUnit
enum<string>
Available options:
days,
hours
banditBurnInValue
number
banditBurnInUnit
enum<string>
Available options:
days,
hours
banditConversionWindowValue
number
banditConversionWindowUnit
enum<string>
Available options:
days,
hours
postStratificationEnabled
boolean | null

When null, the organization default is used.

decisionFrameworkSettings
object

Controls the decision framework and metric overrides for the experiment. Replaces the entire stored object on update (does not patch individual fields).

metricOverrides
object[]

Per-metric analysis overrides for this experiment. Replaces the entire stored array (does not patch individual entries).

defaultDashboardId
string

ID of the default dashboard for this experiment.

customFields
object
customMetricSlices
object[]

Custom slices that apply to ALL applicable metrics in the experiment

Response

200 - application/json

Success

experiment
object
required