curl -X POST https://api.growthbook.io/api/v1/dimensions \
-d '{"name":"User Country", "datasourceId":"ds_123abc", "identifierType":"user", "query":"SELECT country FROM users"}' \
-u secret_abc123DEF456:{
"dimension": {
"id": "<string>",
"dateCreated": "<string>",
"dateUpdated": "<string>",
"owner": "<unknown>",
"datasourceId": "<string>",
"identifierType": "<string>",
"name": "<string>",
"query": "<string>",
"description": "<string>",
"managedBy": ""
}
}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.
If using Bearer auth, pass the Secret Key as the token:
curl https://api.growthbook.io/api/v1 \
-H "Authorization: Bearer secret_abc123DEF456"Name of the dimension
ID of the datasource this dimension belongs to
Type of identifier (user, anonymous, etc.)
SQL query or equivalent for the dimension
Description of the dimension
Where this dimension must be managed from. If not set (empty string), it can be managed from anywhere.
, api Success
Show child attributes
curl -X POST https://api.growthbook.io/api/v1/dimensions \
-d '{"name":"User Country", "datasourceId":"ds_123abc", "identifierType":"user", "query":"SELECT country FROM users"}' \
-u secret_abc123DEF456:{
"dimension": {
"id": "<string>",
"dateCreated": "<string>",
"dateUpdated": "<string>",
"owner": "<unknown>",
"datasourceId": "<string>",
"identifierType": "<string>",
"name": "<string>",
"query": "<string>",
"description": "<string>",
"managedBy": ""
}
}