GrowthBook REST API (1.0.0)
Download OpenAPI specification:Download
GrowthBook offers a full REST API for interacting with the application.
Request data can use either JSON or Form data encoding (with proper Content-Type
headers). All response bodies are JSON-encoded.
The API base URL for GrowthBook Cloud is https://api.growthbook.io
. For self-hosted deployments, it is the same as your API_HOST environment variable (defaults to http://localhost:3100
). The rest of these docs will assume you are using GrowthBook Cloud.
We support both the HTTP Basic and Bearer authentication schemes for convenience.
You first need to generate a new API Key in GrowthBook. Different keys have different permissions:
- Personal Access Tokens: These are sensitive and provide the same level of access as the user has to an organization. These can be created by going to
Personal Access Tokens
under the your user menu. - Secret Keys: These are sensitive and provide the level of access for the role, which currently is either
admin
orreadonly
. Only Admins with themanageApiKeys
permission can manage Secret Keys on behalf of an organization. These can be created by going toSettings -> API Keys
If using HTTP Basic auth, pass the Secret Key as the username and leave the password blank:
curl https://api.growthbook.io/api/v1 \
-u secret_abc123DEF456:
# The ":" at the end stops curl from asking for a password
If using Bearer auth, pass the Secret Key as the token:
curl https://api.growthbook.io/api/v1 \
-H "Authorization: Bearer secret_abc123DEF456"
The API may return the following error status codes:
- 400 - Bad Request - Often due to a missing required parameter
- 401 - Unauthorized - No valid API key provided
- 402 - Request Failed - The parameters are valid, but the request failed
- 403 - Forbidden - Provided API key does not have the required access
- 404 - Not Found - Unknown API route or requested resource
- 429 - Too Many Requests - You exceeded the rate limit of 60 requests per minute. Try again later.
- 5XX - Server Error - Something went wrong on GrowthBook's end (these are rare)
The response body will be a JSON object with the following properties:
- message - Information about the error
Get all projects
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer Default: 0 How many items to skip (use in conjunction with limit for pagination) |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/projects \ -u secret_abc123DEF456:
Response samples
- 200
{- "projects": [
- {
- "id": "string",
- "name": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "description": "string",
- "settings": {
- "statsEngine": "string"
}
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Create a single project
Authorizations:
Request Body schema: application/json
name required | string |
description | string |
object Project settings. |
Responses
Request samples
- Payload
- cURL
{- "name": "string",
- "description": "string",
- "settings": {
- "statsEngine": "string"
}
}
Response samples
- 200
{- "project": {
- "id": "string",
- "name": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "description": "string",
- "settings": {
- "statsEngine": "string"
}
}
}
Get a single project
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/projects/prj_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "project": {
- "id": "string",
- "name": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "description": "string",
- "settings": {
- "statsEngine": "string"
}
}
}
Edit a single project
Authorizations:
path Parameters
id required | string The id of the requested resource |
Request Body schema: application/json
name | string Project name. |
description | string Project description. |
object Project settings. |
Responses
Request samples
- Payload
- cURL
{- "name": "string",
- "description": "string",
- "settings": {
- "statsEngine": "string"
}
}
Response samples
- 200
{- "project": {
- "id": "string",
- "name": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "description": "string",
- "settings": {
- "statsEngine": "string"
}
}
}
Deletes a single project
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl -X DELETE https://api.growthbook.io/api/v1/projects/prj__123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "deletedId": "prj__123abc"
}
GrowthBook comes with one environment by default (production), but you can add as many as you need. When used with feature flags, you can enable/disable feature flags on a per-environment basis.
Request samples
- cURL
curl https://api.growthbook.io/api/v1/environments \ -u secret_abc123DEF456:
Response samples
- 200
{- "environments": [
- {
- "id": "string",
- "description": "string",
- "toggleOnList": true,
- "defaultState": true,
- "projects": [
- "string"
]
}
]
}
Create a new environment
Authorizations:
Request Body schema: application/json
id required | string The ID of the new environment |
description | string The description of the new environment |
toggleOnList | bool Show toggle on feature list |
defaultState | bool Default state for new features |
projects | Array of strings |
Responses
Request samples
- Payload
- cURL
{- "id": "string",
- "description": "string",
- "toggleOnList": null,
- "defaultState": null,
- "projects": [
- "string"
]
}
Response samples
- 200
{- "environment": {
- "id": "string",
- "description": "string",
- "toggleOnList": true,
- "defaultState": true,
- "projects": [
- "string"
]
}
}
Update an environment
Authorizations:
path Parameters
id required | string The id of the requested resource |
Request Body schema: application/json
description | string The description of the new environment |
toggleOnList | boolean Show toggle on feature list |
defaultState | boolean Default state for new features |
projects | Array of strings |
Responses
Request samples
- Payload
- cURL
{- "description": "string",
- "toggleOnList": true,
- "defaultState": true,
- "projects": [
- "string"
]
}
Response samples
- 200
{- "environment": {
- "id": "string",
- "description": "string",
- "toggleOnList": true,
- "defaultState": true,
- "projects": [
- "string"
]
}
}
Deletes a single environment
Authorizations:
path Parameters
id required | string The id of the requested resource |
Request Body schema: application/json
removeAssociatedFeatureRules | boolean Whether to also remove rules from features for the environment to be deleted |
Responses
Request samples
- Payload
- cURL
{- "removeAssociatedFeatureRules": true
}
Response samples
- 200
{- "deletedId": "string"
}
Get all features
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer Default: 0 How many items to skip (use in conjunction with limit for pagination) |
projectId | string Filter by project id |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/features \ -u secret_abc123DEF456:
Response samples
- 200
{- "features": [
- {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "archived": true,
- "description": "string",
- "owner": "string",
- "project": "string",
- "valueType": "boolean",
- "defaultValue": "string",
- "tags": [
- "string"
], - "environments": {
- "property1": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- null
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": null,
- "savedGroups": [ ]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}, - "property2": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- null
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": null,
- "savedGroups": [ ]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}
}, - "prerequisites": [
- {
- "parentId": "string",
- "parentCondition": "string"
}
], - "revision": {
- "version": 0,
- "comment": "string",
- "date": "2019-08-24T14:15:22Z",
- "publishedBy": "string"
}
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Create a single feature
Authorizations:
Request Body schema: application/json
id required | string non-empty A unique key name for the feature. Feature keys can only include letters, numbers, hyphens, and underscores. |
archived | boolean |
description | string Description of the feature |
owner required | string Email of the person who owns this experiment |
project | string An associated project ID |
valueType required | string Enum: "boolean" "string" "number" "json" The data type of the feature payload. Boolean by default. |
defaultValue required | string Default value when feature is enabled. Type must match |
tags | Array of strings List of associated tags |
object A dictionary of environments that are enabled for this feature. Keys supply the names of environments. Environments belong to organization and are not specified will be disabled by default. | |
jsonSchema | string Use JSON schema to validate the payload of a JSON-type feature value (enterprise only). |
Responses
Request samples
- Payload
- cURL
{- "id": "string",
- "archived": true,
- "description": "string",
- "owner": "string",
- "project": "string",
- "valueType": "boolean",
- "defaultValue": "string",
- "tags": [
- "string"
], - "environments": {
- "property1": {
- "enabled": true,
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}, - "property2": {
- "enabled": true,
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}
}, - "jsonSchema": "string"
}
Response samples
- 200
{- "feature": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "archived": true,
- "description": "string",
- "owner": "string",
- "project": "string",
- "valueType": "boolean",
- "defaultValue": "string",
- "tags": [
- "string"
], - "environments": {
- "property1": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- null
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}, - "property2": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- null
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}
}, - "prerequisites": [
- {
- "parentId": "string",
- "parentCondition": "string"
}
], - "revision": {
- "version": 0,
- "comment": "string",
- "date": "2019-08-24T14:15:22Z",
- "publishedBy": "string"
}
}
}
Get a single feature
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/features/my_feature \ -u secret_abc123DEF456:
Response samples
- 200
{- "feature": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "archived": true,
- "description": "string",
- "owner": "string",
- "project": "string",
- "valueType": "boolean",
- "defaultValue": "string",
- "tags": [
- "string"
], - "environments": {
- "property1": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- null
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}, - "property2": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- null
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}
}, - "prerequisites": [
- {
- "parentId": "string",
- "parentCondition": "string"
}
], - "revision": {
- "version": 0,
- "comment": "string",
- "date": "2019-08-24T14:15:22Z",
- "publishedBy": "string"
}
}
}
Partially update a feature
Authorizations:
path Parameters
id required | string The id of the requested resource |
Request Body schema: application/json
description | string Description of the feature |
archived | boolean |
project | string An associated project ID |
owner | string |
defaultValue | string |
tags | Array of strings List of associated tags. Will override tags completely with submitted list |
object | |
jsonSchema | string Use JSON schema to validate the payload of a JSON-type feature value (enterprise only). |
Responses
Request samples
- Payload
- cURL
{- "description": "string",
- "archived": true,
- "project": "string",
- "owner": "string",
- "defaultValue": "string",
- "tags": [
- "string"
], - "environments": {
- "property1": {
- "enabled": true,
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}, - "property2": {
- "enabled": true,
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}
}, - "jsonSchema": "string"
}
Response samples
- 200
{- "feature": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "archived": true,
- "description": "string",
- "owner": "string",
- "project": "string",
- "valueType": "boolean",
- "defaultValue": "string",
- "tags": [
- "string"
], - "environments": {
- "property1": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- null
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}, - "property2": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- null
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}
}, - "prerequisites": [
- {
- "parentId": "string",
- "parentCondition": "string"
}
], - "revision": {
- "version": 0,
- "comment": "string",
- "date": "2019-08-24T14:15:22Z",
- "publishedBy": "string"
}
}
}
Toggle a feature in one or more environments
Authorizations:
path Parameters
id required | string The id of the requested resource |
Request Body schema: application/json
reason | string |
required | object |
Responses
Request samples
- Payload
- cURL
{- "reason": "string",
- "environments": {
- "property1": true,
- "property2": true
}
}
Response samples
- 200
{- "feature": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "archived": true,
- "description": "string",
- "owner": "string",
- "project": "string",
- "valueType": "boolean",
- "defaultValue": "string",
- "tags": [
- "string"
], - "environments": {
- "property1": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- null
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}, - "property2": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string",
- "draft": {
- "enabled": true,
- "defaultValue": "string",
- "rules": [
- {
- "description": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- null
]
}
], - "id": "string",
- "enabled": true,
- "type": "force",
- "value": "string"
}
], - "definition": "string"
}
}
}, - "prerequisites": [
- {
- "parentId": "string",
- "parentCondition": "string"
}
], - "revision": {
- "version": 0,
- "comment": "string",
- "date": "2019-08-24T14:15:22Z",
- "publishedBy": "string"
}
}
}
Get all data sources
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer Default: 0 How many items to skip (use in conjunction with limit for pagination) |
projectId | string Filter by project id |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/data-sources \ -u secret_abc123DEF456:
Response samples
- 200
{- "dataSources": [
- {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "type": "string",
- "name": "string",
- "description": "string",
- "projectIds": [
- "string"
], - "eventTracker": "string",
- "identifierTypes": [
- {
- "id": "string",
- "description": "string"
}
], - "assignmentQueries": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "identifierType": "string",
- "sql": "string",
- "includesNameColumns": true,
- "dimensionColumns": [
- "string"
]
}
], - "identifierJoinQueries": [
- {
- "identifierTypes": [
- "string"
], - "sql": "string"
}
], - "mixpanelSettings": {
- "viewedExperimentEventName": "string",
- "experimentIdProperty": "string",
- "variationIdProperty": "string",
- "extraUserIdProperty": "string"
}
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Get a single data source
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/data-sources/ds_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "dataSource": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "type": "string",
- "name": "string",
- "description": "string",
- "projectIds": [
- "string"
], - "eventTracker": "string",
- "identifierTypes": [
- {
- "id": "string",
- "description": "string"
}
], - "assignmentQueries": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "identifierType": "string",
- "sql": "string",
- "includesNameColumns": true,
- "dimensionColumns": [
- "string"
]
}
], - "identifierJoinQueries": [
- {
- "identifierTypes": [
- "string"
], - "sql": "string"
}
], - "mixpanelSettings": {
- "viewedExperimentEventName": "string",
- "experimentIdProperty": "string",
- "variationIdProperty": "string",
- "extraUserIdProperty": "string"
}
}
}
Get all metrics
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer Default: 0 How many items to skip (use in conjunction with limit for pagination) |
projectId | string Filter by project id |
datasourceId | string Filter by Data Source |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/metrics \ -u secret_abc123DEF456:
Response samples
- 200
{- "metrics": [
- {
- "id": "string",
- "managedBy": "",
- "dateCreated": "string",
- "dateUpdated": "string",
- "owner": "string",
- "datasourceId": "string",
- "name": "string",
- "description": "string",
- "type": "binomial",
- "tags": [
- "string"
], - "projects": [
- "string"
], - "archived": true,
- "behavior": {
- "goal": "increase",
- "cappingSettings": {
- "type": "none",
- "value": 0,
- "ignoreZeros": true
}, - "cap": 0,
- "capping": "absolute",
- "capValue": 0,
- "windowSettings": {
- "type": "none",
- "delayHours": 0,
- "windowValue": 0,
- "windowUnit": "hours"
}, - "priorSettings": {
- "override": true,
- "proper": true,
- "mean": 0,
- "stddev": 0
}, - "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "riskThresholdSuccess": 0,
- "riskThresholdDanger": 0,
- "minPercentChange": 0,
- "maxPercentChange": 0,
- "minSampleSize": 0
}, - "sql": {
- "identifierTypes": [
- "string"
], - "conversionSQL": "string",
- "userAggregationSQL": "string",
- "denominatorMetricId": "string"
}, - "sqlBuilder": {
- "identifierTypeColumns": [
- {
- "identifierType": "string",
- "columnName": "string"
}
], - "tableName": "string",
- "valueColumnName": "string",
- "timestampColumnName": "string",
- "conditions": [
- {
- "column": "string",
- "operator": "string",
- "value": "string"
}
]
}, - "mixpanel": {
- "eventName": "string",
- "eventValue": "string",
- "userAggregation": "string",
- "conditions": [
- {
- "property": "string",
- "operator": "string",
- "value": "string"
}
]
}
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Create a single metric
Authorizations:
Request Body schema: application/json
datasourceId required | string ID for the DataSource |
managedBy | string Enum: "" "api" Where this metric must be managed from. If not set (empty string), it can be managed from anywhere. |
owner | string Name of the person who owns this metric |
name required | string Name of the metric |
description | string Description of the metric |
type required | |
tags | Array of strings List of tags |
projects | Array of strings List of project IDs for projects that can access this metric |
archived | boolean |
object | |
object Preferred way to define SQL. Only one of | |
object An alternative way to specify a SQL metric, rather than a full query. Using | |
object Only use for MixPanel (non-SQL) Data Sources. Only one of |
Responses
Request samples
- Payload
- cURL
{- "datasourceId": "string",
- "managedBy": "",
- "owner": "string",
- "name": "string",
- "description": "string",
- "type": "binomial",
- "tags": [
- "string"
], - "projects": [
- "string"
], - "archived": true,
- "behavior": {
- "goal": "increase",
- "cappingSettings": {
- "type": "none",
- "value": 0,
- "ignoreZeros": true
}, - "cap": 0,
- "capping": "absolute",
- "capValue": 0,
- "windowSettings": {
- "type": "none",
- "delayHours": 0,
- "windowValue": 0,
- "windowUnit": "hours"
}, - "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "priorSettings": {
- "override": true,
- "proper": true,
- "mean": 0,
- "stddev": 0
}, - "riskThresholdSuccess": 0,
- "riskThresholdDanger": 0,
- "minPercentChange": 0,
- "maxPercentChange": 0,
- "minSampleSize": 0
}, - "sql": {
- "identifierTypes": [
- "string"
], - "conversionSQL": "string",
- "userAggregationSQL": "string",
- "denominatorMetricId": "string"
}, - "sqlBuilder": {
- "identifierTypeColumns": [
- {
- "identifierType": "string",
- "columnName": "string"
}
], - "tableName": "string",
- "valueColumnName": "string",
- "timestampColumnName": "string",
- "conditions": [
- {
- "column": "string",
- "operator": "string",
- "value": "string"
}
]
}, - "mixpanel": {
- "eventName": "string",
- "eventValue": "string",
- "userAggregation": "string",
- "conditions": [
- {
- "property": "string",
- "operator": "string",
- "value": "string"
}
]
}
}
Response samples
- 200
{- "metric": {
- "id": "string",
- "managedBy": "",
- "dateCreated": "string",
- "dateUpdated": "string",
- "owner": "string",
- "datasourceId": "string",
- "name": "string",
- "description": "string",
- "type": "binomial",
- "tags": [
- "string"
], - "projects": [
- "string"
], - "archived": true,
- "behavior": {
- "goal": "increase",
- "cappingSettings": {
- "type": "none",
- "value": 0,
- "ignoreZeros": true
}, - "cap": 0,
- "capping": "absolute",
- "capValue": 0,
- "windowSettings": {
- "type": "none",
- "delayHours": 0,
- "windowValue": 0,
- "windowUnit": "hours"
}, - "priorSettings": {
- "override": true,
- "proper": true,
- "mean": 0,
- "stddev": 0
}, - "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "riskThresholdSuccess": 0,
- "riskThresholdDanger": 0,
- "minPercentChange": 0,
- "maxPercentChange": 0,
- "minSampleSize": 0
}, - "sql": {
- "identifierTypes": [
- "string"
], - "conversionSQL": "string",
- "userAggregationSQL": "string",
- "denominatorMetricId": "string"
}, - "sqlBuilder": {
- "identifierTypeColumns": [
- {
- "identifierType": "string",
- "columnName": "string"
}
], - "tableName": "string",
- "valueColumnName": "string",
- "timestampColumnName": "string",
- "conditions": [
- {
- "column": "string",
- "operator": "string",
- "value": "string"
}
]
}, - "mixpanel": {
- "eventName": "string",
- "eventValue": "string",
- "userAggregation": "string",
- "conditions": [
- {
- "property": "string",
- "operator": "string",
- "value": "string"
}
]
}
}
}
Get a single metric
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/metrics/met_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "metric": {
- "id": "string",
- "managedBy": "",
- "dateCreated": "string",
- "dateUpdated": "string",
- "owner": "string",
- "datasourceId": "string",
- "name": "string",
- "description": "string",
- "type": "binomial",
- "tags": [
- "string"
], - "projects": [
- "string"
], - "archived": true,
- "behavior": {
- "goal": "increase",
- "cappingSettings": {
- "type": "none",
- "value": 0,
- "ignoreZeros": true
}, - "cap": 0,
- "capping": "absolute",
- "capValue": 0,
- "windowSettings": {
- "type": "none",
- "delayHours": 0,
- "windowValue": 0,
- "windowUnit": "hours"
}, - "priorSettings": {
- "override": true,
- "proper": true,
- "mean": 0,
- "stddev": 0
}, - "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "riskThresholdSuccess": 0,
- "riskThresholdDanger": 0,
- "minPercentChange": 0,
- "maxPercentChange": 0,
- "minSampleSize": 0
}, - "sql": {
- "identifierTypes": [
- "string"
], - "conversionSQL": "string",
- "userAggregationSQL": "string",
- "denominatorMetricId": "string"
}, - "sqlBuilder": {
- "identifierTypeColumns": [
- {
- "identifierType": "string",
- "columnName": "string"
}
], - "tableName": "string",
- "valueColumnName": "string",
- "timestampColumnName": "string",
- "conditions": [
- {
- "column": "string",
- "operator": "string",
- "value": "string"
}
]
}, - "mixpanel": {
- "eventName": "string",
- "eventValue": "string",
- "userAggregation": "string",
- "conditions": [
- {
- "property": "string",
- "operator": "string",
- "value": "string"
}
]
}
}
}
Update a metric
Authorizations:
path Parameters
id required | string The id of the requested resource |
Request Body schema: application/json
managedBy | string Enum: "" "api" Where this metric must be managed from. If not set (empty string), it can be managed from anywhere. |
owner | string Name of the person who owns this metric |
name | string Name of the metric |
description | string Description of the metric |
type | |
tags | Array of strings List of tags |
projects | Array of strings List of project IDs for projects that can access this metric |
archived | boolean |
object | |
object Preferred way to define SQL. Only one of | |
object An alternative way to specify a SQL metric, rather than a full query. Using | |
object Only use for MixPanel (non-SQL) Data Sources. Only one of |
Responses
Request samples
- Payload
- cURL
{- "managedBy": "",
- "owner": "string",
- "name": "string",
- "description": "string",
- "type": "binomial",
- "tags": [
- "string"
], - "projects": [
- "string"
], - "archived": true,
- "behavior": {
- "goal": "increase",
- "cappingSettings": {
- "type": "none",
- "value": 0,
- "ignoreZeros": true
}, - "cap": 0,
- "capping": "absolute",
- "capValue": 0,
- "windowSettings": {
- "type": "none",
- "delayHours": 0,
- "windowValue": 0,
- "windowUnit": "hours"
}, - "conversionWindowStart": 0,
- "conversionWindowEnd": 0,
- "priorSettings": {
- "override": true,
- "proper": true,
- "mean": 0,
- "stddev": 0
}, - "riskThresholdSuccess": 0,
- "riskThresholdDanger": 0,
- "minPercentChange": 0,
- "maxPercentChange": 0,
- "minSampleSize": 0
}, - "sql": {
- "identifierTypes": [
- "string"
], - "conversionSQL": "string",
- "userAggregationSQL": "string",
- "denominatorMetricId": "string"
}, - "sqlBuilder": {
- "identifierTypeColumns": [
- {
- "identifierType": "string",
- "columnName": "string"
}
], - "tableName": "string",
- "valueColumnName": "string",
- "timestampColumnName": "string",
- "conditions": [
- {
- "column": "string",
- "operator": "string",
- "value": "string"
}
]
}, - "mixpanel": {
- "eventName": "string",
- "eventValue": "string",
- "userAggregation": "string",
- "conditions": [
- {
- "property": "string",
- "operator": "string",
- "value": "string"
}
]
}
}
Response samples
- 200
{- "updatedId": "string"
}
Deletes a metric
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl -X DELETE https://api.growthbook.io/api/v1/metrics/met_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "deletedId": "string"
}
Get all experiments
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer Default: 0 How many items to skip (use in conjunction with limit for pagination) |
projectId | string Filter by project id |
datasourceId | string Filter by Data Source |
experimentId | string Filter the returned list by the experiment tracking key (id) |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/experiments \ -u secret_abc123DEF456:
Response samples
- 200
{- "experiments": [
- {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "project": "string",
- "hypothesis": "string",
- "description": "string",
- "tags": [
- "string"
], - "owner": "string",
- "archived": true,
- "status": "string",
- "autoRefresh": true,
- "hashAttribute": "string",
- "fallbackAttribute": "string",
- "hashVersion": 1,
- "disableStickyBucketing": true,
- "bucketVersion": 0,
- "minBucketVersion": 0,
- "variations": [
- {
- "variationId": "string",
- "key": "string",
- "name": "string",
- "description": "string",
- "screenshots": [
- "string"
]
}
], - "phases": [
- {
- "name": "string",
- "dateStarted": "string",
- "dateEnded": "string",
- "reasonForStopping": "string",
- "seed": "string",
- "coverage": 0,
- "trafficSplit": [
- {
- "variationId": "string",
- "weight": 0
}
], - "namespace": {
- "namespaceId": "string",
- "range": [ ]
}, - "targetingCondition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
]
}
], - "settings": {
- "datasourceId": "string",
- "assignmentQueryId": "string",
- "experimentId": "string",
- "segmentId": "string",
- "queryFilter": "string",
- "inProgressConversions": "include",
- "attributionModel": "firstExposure",
- "statsEngine": "bayesian",
- "regressionAdjustmentEnabled": true,
- "goals": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "secondaryMetrics": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "guardrails": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "activationMetric": {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
}, - "resultSummary": {
- "status": "string",
- "winner": "string",
- "conclusions": "string",
- "releasedVariationId": "string",
- "excludeFromPayload": true
}
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Create a single experiment
Authorizations:
Request Body schema: application/json
datasourceId required | string ID for the DataSource |
assignmentQueryId required | string The ID property of one of the assignment query objects associated with the datasource |
trackingKey required | string |
name required | string Name of the experiment |
project | string Project ID which the experiment belongs to |
hypothesis | string Hypothesis of the experiment |
description | string Description of the experiment |
tags | Array of strings |
metrics | Array of strings |
secondaryMetrics | Array of strings |
guardrailMetrics | Array of strings |
owner | string Email of the person who owns this experiment |
archived | boolean |
status | string Enum: "draft" "running" "stopped" |
autoRefresh | boolean |
hashAttribute | string |
fallbackAttribute | string |
hashVersion | number Enum: 1 2 |
disableStickyBucketing | boolean |
bucketVersion | number |
minBucketVersion | number |
releasedVariationId | string |
excludeFromPayload | boolean |
inProgressConversions | string Enum: "loose" "strict" |
attributionModel | string Enum: "firstExposure" "experimentDuration" Setting attribution model to |
statsEngine | string Enum: "bayesian" "frequentist" |
required | Array of objects >= 2 items |
Array of objects | |
regressionAdjustmentEnabled | boolean Controls whether regression adjustment (CUPED) is enabled for experiment analyses |
Responses
Request samples
- Payload
- cURL
{- "datasourceId": "string",
- "assignmentQueryId": "string",
- "trackingKey": "string",
- "name": "string",
- "project": "string",
- "hypothesis": "string",
- "description": "string",
- "tags": [
- "string"
], - "metrics": [
- "string"
], - "secondaryMetrics": [
- "string"
], - "guardrailMetrics": [
- "string"
], - "owner": "string",
- "archived": true,
- "status": "draft",
- "autoRefresh": true,
- "hashAttribute": "string",
- "fallbackAttribute": "string",
- "hashVersion": 1,
- "disableStickyBucketing": true,
- "bucketVersion": 0,
- "minBucketVersion": 0,
- "releasedVariationId": "string",
- "excludeFromPayload": true,
- "inProgressConversions": "loose",
- "attributionModel": "firstExposure",
- "statsEngine": "bayesian",
- "variations": [
- {
- "id": "string",
- "key": "string",
- "name": "string",
- "description": "string",
- "screenshots": [
- {
- "path": "string",
- "width": 0,
- "height": 0,
- "description": "string"
}
]
}, - {
- "id": "string",
- "key": "string",
- "name": "string",
- "description": "string",
- "screenshots": [
- {
- "path": "string",
- "width": 0,
- "height": 0,
- "description": "string"
}
]
}
], - "phases": [
- {
- "name": "string",
- "dateStarted": "2019-08-24T14:15:22Z",
- "dateEnded": "2019-08-24T14:15:22Z",
- "reasonForStopping": "string",
- "seed": "string",
- "coverage": 0,
- "trafficSplit": [
- {
- "variationId": "string",
- "weight": 0
}
], - "namespace": {
- "namespaceId": "string",
- "range": [
- 0,
- 0
], - "enabled": true
}, - "targetingCondition": "string",
- "reason": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "variationWeights": [
- 0
]
}
], - "regressionAdjustmentEnabled": true
}
Response samples
- 200
{- "experiment": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "project": "string",
- "hypothesis": "string",
- "description": "string",
- "tags": [
- "string"
], - "owner": "string",
- "archived": true,
- "status": "string",
- "autoRefresh": true,
- "hashAttribute": "string",
- "fallbackAttribute": "string",
- "hashVersion": 1,
- "disableStickyBucketing": true,
- "bucketVersion": 0,
- "minBucketVersion": 0,
- "variations": [
- {
- "variationId": "string",
- "key": "string",
- "name": "string",
- "description": "string",
- "screenshots": [
- "string"
]
}
], - "phases": [
- {
- "name": "string",
- "dateStarted": "string",
- "dateEnded": "string",
- "reasonForStopping": "string",
- "seed": "string",
- "coverage": 0,
- "trafficSplit": [
- {
- "variationId": "string",
- "weight": 0
}
], - "namespace": {
- "namespaceId": "string",
- "range": [ ]
}, - "targetingCondition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
]
}
], - "settings": {
- "datasourceId": "string",
- "assignmentQueryId": "string",
- "experimentId": "string",
- "segmentId": "string",
- "queryFilter": "string",
- "inProgressConversions": "include",
- "attributionModel": "firstExposure",
- "statsEngine": "bayesian",
- "regressionAdjustmentEnabled": true,
- "goals": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "secondaryMetrics": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "guardrails": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "activationMetric": {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
}, - "resultSummary": {
- "status": "string",
- "winner": "string",
- "conclusions": "string",
- "releasedVariationId": "string",
- "excludeFromPayload": true
}
}
}
Get a single experiment
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/experiments/exp_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "experiment": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "project": "string",
- "hypothesis": "string",
- "description": "string",
- "tags": [
- "string"
], - "owner": "string",
- "archived": true,
- "status": "string",
- "autoRefresh": true,
- "hashAttribute": "string",
- "fallbackAttribute": "string",
- "hashVersion": 1,
- "disableStickyBucketing": true,
- "bucketVersion": 0,
- "minBucketVersion": 0,
- "variations": [
- {
- "variationId": "string",
- "key": "string",
- "name": "string",
- "description": "string",
- "screenshots": [
- "string"
]
}
], - "phases": [
- {
- "name": "string",
- "dateStarted": "string",
- "dateEnded": "string",
- "reasonForStopping": "string",
- "seed": "string",
- "coverage": 0,
- "trafficSplit": [
- {
- "variationId": "string",
- "weight": 0
}
], - "namespace": {
- "namespaceId": "string",
- "range": [ ]
}, - "targetingCondition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
]
}
], - "settings": {
- "datasourceId": "string",
- "assignmentQueryId": "string",
- "experimentId": "string",
- "segmentId": "string",
- "queryFilter": "string",
- "inProgressConversions": "include",
- "attributionModel": "firstExposure",
- "statsEngine": "bayesian",
- "regressionAdjustmentEnabled": true,
- "goals": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "secondaryMetrics": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "guardrails": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "activationMetric": {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
}, - "resultSummary": {
- "status": "string",
- "winner": "string",
- "conclusions": "string",
- "releasedVariationId": "string",
- "excludeFromPayload": true
}
}
}
Update a single experiment
Authorizations:
path Parameters
id required | string The id of the requested resource |
Request Body schema: application/json
assignmentQueryId | string |
trackingKey | string |
name | string Name of the experiment |
project | string Project ID which the experiment belongs to |
hypothesis | string Hypothesis of the experiment |
description | string Description of the experiment |
tags | Array of strings |
metrics | Array of strings |
secondaryMetrics | Array of strings |
guardrailMetrics | Array of strings |
owner | string Email of the person who owns this experiment |
archived | boolean |
status | string Enum: "draft" "running" "stopped" |
autoRefresh | boolean |
hashAttribute | string |
fallbackAttribute | string |
hashVersion | number Enum: 1 2 |
disableStickyBucketing | boolean |
bucketVersion | number |
minBucketVersion | number |
releasedVariationId | string |
excludeFromPayload | boolean |
inProgressConversions | string Enum: "loose" "strict" |
attributionModel | string Enum: "firstExposure" "experimentDuration" Setting attribution model to |
statsEngine | string Enum: "bayesian" "frequentist" |
Array of objects >= 2 items | |
Array of objects | |
regressionAdjustmentEnabled | boolean Controls whether regression adjustment (CUPED) is enabled for experiment analyses |
Responses
Request samples
- Payload
- cURL
{- "assignmentQueryId": "string",
- "trackingKey": "string",
- "name": "string",
- "project": "string",
- "hypothesis": "string",
- "description": "string",
- "tags": [
- "string"
], - "metrics": [
- "string"
], - "secondaryMetrics": [
- "string"
], - "guardrailMetrics": [
- "string"
], - "owner": "string",
- "archived": true,
- "status": "draft",
- "autoRefresh": true,
- "hashAttribute": "string",
- "fallbackAttribute": "string",
- "hashVersion": 1,
- "disableStickyBucketing": true,
- "bucketVersion": 0,
- "minBucketVersion": 0,
- "releasedVariationId": "string",
- "excludeFromPayload": true,
- "inProgressConversions": "loose",
- "attributionModel": "firstExposure",
- "statsEngine": "bayesian",
- "variations": [
- {
- "id": "string",
- "key": "string",
- "name": "string",
- "description": "string",
- "screenshots": [
- {
- "path": "string",
- "width": 0,
- "height": 0,
- "description": "string"
}
]
}, - {
- "id": "string",
- "key": "string",
- "name": "string",
- "description": "string",
- "screenshots": [
- {
- "path": "string",
- "width": 0,
- "height": 0,
- "description": "string"
}
]
}
], - "phases": [
- {
- "name": "string",
- "dateStarted": "2019-08-24T14:15:22Z",
- "dateEnded": "2019-08-24T14:15:22Z",
- "reasonForStopping": "string",
- "seed": "string",
- "coverage": 0,
- "trafficSplit": [
- {
- "variationId": "string",
- "weight": 0
}
], - "namespace": {
- "namespaceId": "string",
- "range": [
- 0,
- 0
], - "enabled": true
}, - "targetingCondition": "string",
- "reason": "string",
- "condition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
], - "variationWeights": [
- 0
]
}
], - "regressionAdjustmentEnabled": true
}
Response samples
- 200
{- "experiment": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "project": "string",
- "hypothesis": "string",
- "description": "string",
- "tags": [
- "string"
], - "owner": "string",
- "archived": true,
- "status": "string",
- "autoRefresh": true,
- "hashAttribute": "string",
- "fallbackAttribute": "string",
- "hashVersion": 1,
- "disableStickyBucketing": true,
- "bucketVersion": 0,
- "minBucketVersion": 0,
- "variations": [
- {
- "variationId": "string",
- "key": "string",
- "name": "string",
- "description": "string",
- "screenshots": [
- "string"
]
}
], - "phases": [
- {
- "name": "string",
- "dateStarted": "string",
- "dateEnded": "string",
- "reasonForStopping": "string",
- "seed": "string",
- "coverage": 0,
- "trafficSplit": [
- {
- "variationId": "string",
- "weight": 0
}
], - "namespace": {
- "namespaceId": "string",
- "range": [ ]
}, - "targetingCondition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
]
}
], - "settings": {
- "datasourceId": "string",
- "assignmentQueryId": "string",
- "experimentId": "string",
- "segmentId": "string",
- "queryFilter": "string",
- "inProgressConversions": "include",
- "attributionModel": "firstExposure",
- "statsEngine": "bayesian",
- "regressionAdjustmentEnabled": true,
- "goals": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "secondaryMetrics": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "guardrails": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "activationMetric": {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
}, - "resultSummary": {
- "status": "string",
- "winner": "string",
- "conclusions": "string",
- "releasedVariationId": "string",
- "excludeFromPayload": true
}
}
}
Create Experiment Snapshot
Authorizations:
path Parameters
id required | string The experiment id of the experiment to update |
Request Body schema: application/json
triggeredBy | string Enum: "manual" "schedule" Set to "schedule" if you want this request to trigger notifications and other events as it if were a scheduled update. Defaults to manual. |
Responses
Request samples
- Payload
- cURL
{- "triggeredBy": "manual"
}
Response samples
- 200
{- "snapshot": {
- "id": "string",
- "experiment": "string",
- "status": "string"
}
}
Get results for an experiment
Authorizations:
path Parameters
id required | string The id of the requested resource |
query Parameters
phase | string |
dimension | string |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/experiments/exp_123abc/results \ -u secret_abc123DEF456:
Response samples
- 200
{- "result": {
- "id": "string",
- "dateUpdated": "string",
- "experimentId": "string",
- "phase": "string",
- "dateStart": "string",
- "dateEnd": "string",
- "dimension": {
- "type": "string",
- "id": "string"
}, - "settings": {
- "datasourceId": "string",
- "assignmentQueryId": "string",
- "experimentId": "string",
- "segmentId": "string",
- "queryFilter": "string",
- "inProgressConversions": "include",
- "attributionModel": "firstExposure",
- "statsEngine": "bayesian",
- "regressionAdjustmentEnabled": true,
- "goals": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "secondaryMetrics": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "guardrails": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "activationMetric": {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
}, - "queryIds": [
- "string"
], - "results": [
- {
- "dimension": "string",
- "totalUsers": 0,
- "checks": {
- "srm": 0
}, - "metrics": [
- {
- "metricId": "string",
- "variations": [
- {
- "variationId": "string",
- "users": 0,
- "analyses": [
- {
- "engine": null,
- "numerator": null,
- "denominator": null,
- "mean": null,
- "stddev": null,
- "percentChange": null,
- "ciLow": null,
- "ciHigh": null,
- "pValue": null,
- "risk": null,
- "chanceToBeatControl": null
}
]
}
]
}
]
}
]
}
}
Create Experiment Snapshot
Authorizations:
path Parameters
id required | string The experiment id of the experiment to update |
Request Body schema: application/json
triggeredBy | string Enum: "manual" "schedule" Set to "schedule" if you want this request to trigger notifications and other events as it if were a scheduled update. Defaults to manual. |
Responses
Request samples
- Payload
- cURL
{- "triggeredBy": "manual"
}
Response samples
- 200
{- "snapshot": {
- "id": "string",
- "experiment": "string",
- "status": "string"
}
}
Get an experiment snapshot status
Authorizations:
path Parameters
id required | string The id of the requested resource (a snapshot ID, not experiment ID) |
Responses
Request samples
- cURL
curl -X GET https://api.growthbook.io/api/v1/snapshots/snp_1234 \ -u secret_abc123DEF456:
Response samples
- 200
{- "snapshot": {
- "id": "string",
- "experiment": "string",
- "status": "string"
}
}
Get all dimensions
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer Default: 0 How many items to skip (use in conjunction with limit for pagination) |
datasourceId | string Filter by Data Source |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/dimensions \ -u secret_abc123DEF456:
Response samples
- 200
{- "dimensions": [
- {
- "id": "string",
- "dateCreated": "string",
- "dateUpdated": "string",
- "owner": "string",
- "datasourceId": "string",
- "identifierType": "string",
- "name": "string",
- "query": "string"
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Get a single dimension
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/dimensions/dim_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "dimension": {
- "id": "string",
- "dateCreated": "string",
- "dateUpdated": "string",
- "owner": "string",
- "datasourceId": "string",
- "identifierType": "string",
- "name": "string",
- "query": "string"
}
}
Get all segments
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer Default: 0 How many items to skip (use in conjunction with limit for pagination) |
datasourceId | string Filter by Data Source |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/segments \ -u secret_abc123DEF456:
Response samples
- 200
{- "segments": [
- {
- "id": "string",
- "owner": "string",
- "datasourceId": "string",
- "identifierType": "string",
- "name": "string",
- "query": "string",
- "dateCreated": "string",
- "dateUpdated": "string",
- "type": "SQL",
- "factTableId": "string",
- "filters": [
- "string"
]
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Get a single segment
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/segments/seg_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "segment": {
- "id": "string",
- "owner": "string",
- "datasourceId": "string",
- "identifierType": "string",
- "name": "string",
- "query": "string",
- "dateCreated": "string",
- "dateUpdated": "string",
- "type": "SQL",
- "factTableId": "string",
- "filters": [
- "string"
]
}
}
Get all sdk connections
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer Default: 0 How many items to skip (use in conjunction with limit for pagination) |
projectId | string Filter by project id |
withProxy | string |
multiOrg | string |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/sdk-connections \ -u secret_abc123DEF456:
Response samples
- 200
{- "connections": [
- {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "organization": "string",
- "languages": [
- "string"
], - "sdkVersion": "string",
- "environment": "string",
- "project": "string",
- "projects": [
- "string"
], - "encryptPayload": true,
- "encryptionKey": "string",
- "includeVisualExperiments": true,
- "includeDraftExperiments": true,
- "includeExperimentNames": true,
- "includeRedirectExperiments": true,
- "key": "string",
- "proxyEnabled": true,
- "proxyHost": "string",
- "proxySigningKey": "string",
- "sseEnabled": true,
- "hashSecureAttributes": true,
- "remoteEvalEnabled": true,
- "savedGroupReferencesEnabled": true
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Create a single sdk connection
Authorizations:
Request Body schema: application/json
name required | string |
language required | string |
sdkVersion | string |
environment required | string |
projects | Array of strings |
encryptPayload | boolean |
includeVisualExperiments | boolean |
includeDraftExperiments | boolean |
includeExperimentNames | boolean |
includeRedirectExperiments | boolean |
proxyEnabled | boolean |
proxyHost | string |
hashSecureAttributes | boolean |
remoteEvalEnabled | boolean |
savedGroupReferencesEnabled | boolean |
Responses
Request samples
- Payload
- cURL
{- "name": "string",
- "language": "string",
- "sdkVersion": "string",
- "environment": "string",
- "projects": [
- "string"
], - "encryptPayload": true,
- "includeVisualExperiments": true,
- "includeDraftExperiments": true,
- "includeExperimentNames": true,
- "includeRedirectExperiments": true,
- "proxyEnabled": true,
- "proxyHost": "string",
- "hashSecureAttributes": true,
- "remoteEvalEnabled": true,
- "savedGroupReferencesEnabled": true
}
Response samples
- 200
{- "sdkConnection": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "organization": "string",
- "languages": [
- "string"
], - "sdkVersion": "string",
- "environment": "string",
- "project": "string",
- "projects": [
- "string"
], - "encryptPayload": true,
- "encryptionKey": "string",
- "includeVisualExperiments": true,
- "includeDraftExperiments": true,
- "includeExperimentNames": true,
- "includeRedirectExperiments": true,
- "key": "string",
- "proxyEnabled": true,
- "proxyHost": "string",
- "proxySigningKey": "string",
- "sseEnabled": true,
- "hashSecureAttributes": true,
- "remoteEvalEnabled": true,
- "savedGroupReferencesEnabled": true
}
}
Get a single sdk connection
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/sdk-connections/sdk_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "sdkConnection": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "organization": "string",
- "languages": [
- "string"
], - "sdkVersion": "string",
- "environment": "string",
- "project": "string",
- "projects": [
- "string"
], - "encryptPayload": true,
- "encryptionKey": "string",
- "includeVisualExperiments": true,
- "includeDraftExperiments": true,
- "includeExperimentNames": true,
- "includeRedirectExperiments": true,
- "key": "string",
- "proxyEnabled": true,
- "proxyHost": "string",
- "proxySigningKey": "string",
- "sseEnabled": true,
- "hashSecureAttributes": true,
- "remoteEvalEnabled": true,
- "savedGroupReferencesEnabled": true
}
}
Update a single sdk connection
Authorizations:
path Parameters
id required | string The id of the requested resource |
Request Body schema: application/json
name | string |
language | string |
sdkVersion | string |
environment | string |
projects | Array of strings |
encryptPayload | boolean |
includeVisualExperiments | boolean |
includeDraftExperiments | boolean |
includeExperimentNames | boolean |
includeRedirectExperiments | boolean |
proxyEnabled | boolean |
proxyHost | string |
hashSecureAttributes | boolean |
remoteEvalEnabled | boolean |
savedGroupReferencesEnabled | boolean |
Responses
Request samples
- Payload
- cURL
{- "name": "string",
- "language": "string",
- "sdkVersion": "string",
- "environment": "string",
- "projects": [
- "string"
], - "encryptPayload": true,
- "includeVisualExperiments": true,
- "includeDraftExperiments": true,
- "includeExperimentNames": true,
- "includeRedirectExperiments": true,
- "proxyEnabled": true,
- "proxyHost": "string",
- "hashSecureAttributes": true,
- "remoteEvalEnabled": true,
- "savedGroupReferencesEnabled": true
}
Response samples
- 200
{- "sdkConnection": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "organization": "string",
- "languages": [
- "string"
], - "sdkVersion": "string",
- "environment": "string",
- "project": "string",
- "projects": [
- "string"
], - "encryptPayload": true,
- "encryptionKey": "string",
- "includeVisualExperiments": true,
- "includeDraftExperiments": true,
- "includeExperimentNames": true,
- "includeRedirectExperiments": true,
- "key": "string",
- "proxyEnabled": true,
- "proxyHost": "string",
- "proxySigningKey": "string",
- "sseEnabled": true,
- "hashSecureAttributes": true,
- "remoteEvalEnabled": true,
- "savedGroupReferencesEnabled": true
}
}
Get all visual changesets
Authorizations:
path Parameters
id required | string The experiment id the visual changesets belong to |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/experiments/exp_123abc/visual-changesets \ -u secret_abc123DEF456:
Response samples
- 200
{- "visualChangesets": [
- {
- "id": "string",
- "urlPatterns": [
- {
- "include": true,
- "type": "simple",
- "pattern": "string"
}
], - "editorUrl": "string",
- "experiment": "string",
- "visualChanges": [
- {
- "description": "string",
- "css": "string",
- "js": "string",
- "variation": "string",
- "domMutations": [
- {
- "selector": "string",
- "action": "append",
- "attribute": "string",
- "value": "string",
- "parentSelector": "string",
- "insertBeforeSelector": "string"
}
]
}
]
}
]
}
Get a single visual changeset
Authorizations:
path Parameters
id required | string The id of the requested resource |
query Parameters
includeExperiment | integer Include the associated experiment in payload |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/visual-changesets/ds_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "visualChangeset": {
- "id": "string",
- "urlPatterns": [
- {
- "include": true,
- "type": "simple",
- "pattern": "string"
}
], - "editorUrl": "string",
- "experiment": "string",
- "visualChanges": [
- {
- "description": "string",
- "css": "string",
- "js": "string",
- "variation": "string",
- "domMutations": [
- {
- "selector": "string",
- "action": "append",
- "attribute": "string",
- "value": "string",
- "parentSelector": "string",
- "insertBeforeSelector": "string"
}
]
}
]
}, - "experiment": {
- "id": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "project": "string",
- "hypothesis": "string",
- "description": "string",
- "tags": [
- "string"
], - "owner": "string",
- "archived": true,
- "status": "string",
- "autoRefresh": true,
- "hashAttribute": "string",
- "fallbackAttribute": "string",
- "hashVersion": 1,
- "disableStickyBucketing": true,
- "bucketVersion": 0,
- "minBucketVersion": 0,
- "variations": [
- {
- "variationId": "string",
- "key": "string",
- "name": "string",
- "description": "string",
- "screenshots": [
- "string"
]
}
], - "phases": [
- {
- "name": "string",
- "dateStarted": "string",
- "dateEnded": "string",
- "reasonForStopping": "string",
- "seed": "string",
- "coverage": 0,
- "trafficSplit": [
- {
- "variationId": "string",
- "weight": 0
}
], - "namespace": {
- "namespaceId": "string",
- "range": [ ]
}, - "targetingCondition": "string",
- "savedGroupTargeting": [
- {
- "matchType": "all",
- "savedGroups": [
- "string"
]
}
]
}
], - "settings": {
- "datasourceId": "string",
- "assignmentQueryId": "string",
- "experimentId": "string",
- "segmentId": "string",
- "queryFilter": "string",
- "inProgressConversions": "include",
- "attributionModel": "firstExposure",
- "statsEngine": "bayesian",
- "regressionAdjustmentEnabled": true,
- "goals": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "secondaryMetrics": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "guardrails": [
- {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
], - "activationMetric": {
- "metricId": "string",
- "overrides": {
- "delayHours": 0,
- "windowHours": 0,
- "window": "conversion",
- "winRiskThreshold": 0,
- "loseRiskThreshold": 0
}
}
}, - "resultSummary": {
- "status": "string",
- "winner": "string",
- "conclusions": "string",
- "releasedVariationId": "string",
- "excludeFromPayload": true
}
}
}
Update a visual changeset
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl -XPUT https://api.growthbook.io/api/v1/visual-changesets/vc_123abc -d '{"editorUrl": "https://docs.growthbook.io", "urlPatterns":"[{ ... }]"}' \ -u secret_abc123DEF456:
Response samples
- 200
{- "nModified": 0,
- "visualChangeset": {
- "id": "string",
- "urlPatterns": [
- {
- "include": true,
- "type": "simple",
- "pattern": "string"
}
], - "editorUrl": "string",
- "experiment": "string",
- "visualChanges": [
- {
- "description": "string",
- "css": "string",
- "js": "string",
- "variation": "string",
- "domMutations": [
- {
- "selector": "string",
- "action": "append",
- "attribute": "string",
- "value": "string",
- "parentSelector": "string",
- "insertBeforeSelector": "string"
}
]
}
]
}
}
Create a visual change for a visual changeset
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl -XPOST https://api.growthbook.io/api/v1/visual-changesets/vc_123abc/visual-change \ -d '{"variation": "v_123abc", "domMutations":"[]"}' \ -u secret_abc123DEF456:
Response samples
- 200
{- "nModified": 0
}
Update a visual change for a visual changeset
Authorizations:
path Parameters
id required | string The id of the requested resource |
visualChangeId required | string Specify a specific visual change |
Responses
Request samples
- cURL
curl -XPUT https://api.growthbook.io/api/v1/visual-changesets/vc_123abc/visual-change/vch_abc123 \ -d '{"variation": "v_123abc", "domMutations":"[]"}' \ -u secret_abc123DEF456:
Response samples
- 200
{- "nModified": 0
}
Defined sets of attribute values which can be used with feature rules for targeting features at particular users.
Get all saved group
Authorizations:
query Parameters
limit | integer Default: 10 The number of items to return |
offset | integer Default: 0 How many items to skip (use in conjunction with limit for pagination) |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/saved-groups \ -u secret_abc123DEF456:
Response samples
- 200
{- "savedGroups": [
- {
- "id": "string",
- "type": "condition",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "owner": "string",
- "condition": "string",
- "attributeKey": "string",
- "values": [
- "string"
], - "description": "string",
- "projects": [
- "string"
]
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Create a single saved group
Authorizations:
Request Body schema: application/json
name required | string The display name of the Saved Group |
type | string Enum: "condition" "list" The type of Saved Group (inferred from other arguments if missing) |
condition | string When type = 'condition', this is the JSON-encoded condition for the group |
attributeKey | string When type = 'list', this is the attribute key the group is based on |
values | Array of strings When type = 'list', this is the list of values for the attribute key |
owner | string The person or team that owns this Saved Group. If no owner, you can pass an empty string. |
projects | Array of strings |
Responses
Request samples
- Payload
- cURL
{- "name": "string",
- "type": "condition",
- "condition": "string",
- "attributeKey": "string",
- "values": [
- "string"
], - "owner": "string",
- "projects": [
- "string"
]
}
Response samples
- 200
{- "savedGroup": {
- "id": "string",
- "type": "condition",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "owner": "string",
- "condition": "string",
- "attributeKey": "string",
- "values": [
- "string"
], - "description": "string",
- "projects": [
- "string"
]
}
}
Get a single saved group
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/saved-groups/ds_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "savedGroup": {
- "id": "string",
- "type": "condition",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "owner": "string",
- "condition": "string",
- "attributeKey": "string",
- "values": [
- "string"
], - "description": "string",
- "projects": [
- "string"
]
}
}
Partially update a single saved group
Authorizations:
path Parameters
id required | string The id of the requested resource |
Request Body schema: application/json
name | string The display name of the Saved Group |
condition | string When type = 'condition', this is the JSON-encoded condition for the group |
values | Array of strings When type = 'list', this is the list of values for the attribute key |
owner | string The person or team that owns this Saved Group. If no owner, you can pass an empty string. |
projects | Array of strings |
Responses
Request samples
- Payload
- cURL
{- "name": "string",
- "condition": "string",
- "values": [
- "string"
], - "owner": "string",
- "projects": [
- "string"
]
}
Response samples
- 200
{- "savedGroup": {
- "id": "string",
- "type": "condition",
- "dateCreated": "2019-08-24T14:15:22Z",
- "dateUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "owner": "string",
- "condition": "string",
- "attributeKey": "string",
- "values": [
- "string"
], - "description": "string",
- "projects": [
- "string"
]
}
}
Deletes a single saved group
Authorizations:
path Parameters
id required | string The id of the requested resource |
Responses
Request samples
- cURL
curl -X DELETE https://api.growthbook.io/api/v1/saved-groups/grp_123abc \ -u secret_abc123DEF456:
Response samples
- 200
{- "deletedId": "string"
}
Organizations are used for multi-org deployments where different teams can run their own isolated feature flags and experiments. These endpoints are only via a super-admin's Personal Access Token.
Get all organizations (only for super admins on multi-org Enterprise Plan only)
Authorizations:
query Parameters
search | string Search string to search organization names, owner emails, and external ids by |
limit | integer Default: 10 The number of items to return |
offset | integer Default: 0 How many items to skip (use in conjunction with limit for pagination) |
Responses
Request samples
- cURL
curl https://api.growthbook.io/api/v1/organizations \ -u secret_abc123DEF456:
Response samples
- 200
{- "organizations": [
- {
- "id": "string",
- "externalId": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "name": "string",
- "ownerEmail": "string"
}
], - "limit": 0,
- "offset": 0,
- "count": 0,
- "total": 0,
- "hasMore": true,
- "nextOffset": 0
}
Create a single organization (only for super admins on multi-org Enterprise Plan only)
Authorizations:
Request Body schema: application/json
name required | string The name of the organization |
externalId | string An optional identifier that you use within your company for the organization |
Responses
Request samples
- Payload
- cURL
{- "name": "string",
- "externalId": "string"
}
Response samples
- 200
{- "organization": {
- "id": "string",
- "externalId": "string",
- "dateCreated": "2019-08-24T14:15:22Z",
- "name": "string",
- "ownerEmail": "string"
}
}
Edit a single organization (only for super admins on multi-org Enterprise Plan only)
Authorizations:
path Parameters
id required | string The id of the requested resource |
Request Body schema: application/json
name | string The name of the organization |
externalId | string An optional identifier that you use within your company for the organization |
Responses
Request samples
- Payload
- cURL
{- "name": "string",
- "externalId": "string"
}
Response samples
- 200
{- "organization":