curl -XPUT https://api.growthbook.io/api/v1/metrics/met_123abc \
-d '{"name": "net revenue", "description":"revenue minus lacroix spend"}' \
-u secret_abc123DEF456:
{
"updatedId": "<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.
If using Bearer auth, pass the Secret Key as the token:
curl https://api.growthbook.io/api/v1 \
-H "Authorization: Bearer secret_abc123DEF456"
The id of the requested resource
Where this metric must be managed from. If not set (empty string), it can be managed from anywhere. If set to "api", it can be managed via the API only. Please note that we have deprecated support for setting the managedBy property to "admin". Your existing Legacy Metrics with this value will continue to work, but we suggest migrating to Fact Metrics instead.
, api, admin Name of the metric
Description of the metric
Type of metric. See Metrics documentation
binomial, count, duration, revenue List of tags
List of project IDs for projects that can access this metric
Show child attributes
Preferred way to define SQL. Only one of sql, sqlBuilder or mixpanel allowed.
Show child attributes
An alternative way to specify a SQL metric, rather than a full query. Using sql is preferred to sqlBuilder. Only one of sql, sqlBuilder or mixpanel allowed
Show child attributes
Only use for MixPanel (non-SQL) Data Sources. Only one of sql, sqlBuilder or mixpanel allowed.
Show child attributes
Success
curl -XPUT https://api.growthbook.io/api/v1/metrics/met_123abc \
-d '{"name": "net revenue", "description":"revenue minus lacroix spend"}' \
-u secret_abc123DEF456:
{
"updatedId": "<string>"
}