Create Metric Definition
Create a new metric definition for the organization. This metric can then be assigned values for specific companies.
POST /external/v1/external/v1/customers/metrics
Request
Parameters
None
Request Body (application/json)
Field
Type
Description
Example
Required
name
string
The unique, human-readable name of the metric (e.g., 'Annual Revenue').
"ARR"
Yes
description
string
A detailed description of what the metric tracks.
"Annual Recurring Revenue in USD."
No
data_type
string
The expected data type for the values of this metric.
"NUMBER"
Yes
Example Request Body:
{
"name": "Customer Tier",
"description": "The service level tier the customer is subscribed to.",
"data_type": "STRING"
}Responses
Successful Response (201) (application/json)
Returns the newly created metric definition object.
Field
Type
Description
id
integer
The internal database ID of the definition.
metric_id
string
The unique external ID assigned to the metric.
name
string
The name of the metric.
description
string
The metric description.
data_type
string
The expected data type.
organization_id
integer
The organization ID this metric belongs to.
time_created
string (datetime)
Creation timestamp.
time_updated
string (datetime)
Last update timestamp.
Example Response Body (201):
Validation Error (422) (application/json)
Last updated