Skip to main content
POST
Add custom metrics data point

Authorizations

Authorization
string
header
required

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path Parameters

customMetricKey
string
required

Key for the custom metric filter

tagOrId
string
required

The tag (x-cortex-tag) or unique, auto-generated identifier (CID) for the entity. If the tag contains forward slashes, URL-encode each / as %2F. The tag is matched exactly as encoded, including leading, trailing, and consecutive slashes, which are preserved and not collapsed (for example, the tag /services/payments-api is referenced as %2Fservices%2Fpayments-api). Tags containing slashes are supported via the API but not in the Cortex UI; this difference is expected. Entity identifier - can be a tag or CID

Body

application/json

Data point to be added

value
number<double>
required

Value for the data point

timestamp
string<date-time>

Timestamp for the data point in ISO 8601 format. Accepts timezone offsets (e.g., '2024-08-14T11:00:00Z' or '2024-08-14T11:00:00+00:00'). Note: It can't be earlier than 2 years

Response

Successfully added data point

Last modified on September 29, 2026