JavaScript
Admin
Create metrics
Create metrics.
POST
JavaScript
Authorizations
Headers
The tenant identifier for multi-tenant organisations. Required when the organisation has multi-tenancy enabled. Pass your own internal customer ID for the tenant. Ignored for single-tenant organisations.
Body
application/json
Array of metrics to create. Maximum 100 metrics per request.
Required array length:
1 - 100 elementsThe metric name.
Example:
"Invites Sent"
The metric key. Only alphanumeric characters, hyphens, and underscores are permitted.
Pattern:
^[a-zA-Z\d-_]+$Example:
"invites-sent"
The metric unit type. Defaults to number.
Available options:
number, currency Example:
"currency"
For unitType: currency, this must be a supported MetricCurrency code such as USD. For number, this is an optional freeform unit label.
Example:
"USD"