Skip to main content
POST
/
experiments
cURL
curl -X POST https://api.growthbook.io/api/v1/experiments \
  -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"

Body

application/json
trackingKey
string
required
name
string
required

Name of the experiment

variations
object[]
required
Minimum array length: 2
datasourceId
string

ID for the DataSource. Can only be set if a templateId is not provided.

assignmentQueryId
string

The ID property of one of the assignment query objects associated with the datasource. Can only be set if a templateId is not provided.

bypassDuplicateKeyCheck
boolean

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

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

Project ID which the experiment belongs to

templateId
string

ID of the ExperimentTemplate this experiment was created from. Template fields are applied by default and overridden by explicitly provided payload fields.

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
releasedVariationId
string
excludeFromPayload
boolean
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
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