Skip to main content
POST
JavaScript

Authorizations

X-API-KEY
string
header
required

Headers

Tenant-ID
string

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 elements
name
string
required

The metric name.

Example:

"Invites Sent"

key
string
required

The metric key. Only alphanumeric characters, hyphens, and underscores are permitted.

Pattern: ^[a-zA-Z\d-_]+$
Example:

"invites-sent"

unitType
enum<string>
default:number

The metric unit type. Defaults to number.

Available options:
number,
currency
Example:

"currency"

units
string

For unitType: currency, this must be a supported MetricCurrency code such as USD. For number, this is an optional freeform unit label.

Example:

"USD"

Response

Successful operation (no metrics created)

Response containing created metrics and any per-item issues.

created
CreatedMetric · object[]
required

Array of successfully created metrics.

issues
AdminIssue · object[]
required

Array of issues encountered during metric creation.