Latest Live API
- Account
- Billing
- Collections
- Customer
- Invoices
- Notifications
- Product
- Quote
- Taxes
- Usage
Version 2024-07-30
- Account
- Billing
- Collections
- Customer
- Invoices
- Notifications
- Product
- Quote
- Taxes
- Usage
- Usage Metrics
- Usage Events
- Seat Metrics
- Seat Events
Usage Metrics
Create a new Usage Metric
Create a new Usage Metric
POST
/
usage-metrics
Copy
Ask AI
curl --request POST \
--url https://eu.sequencehq.com/api/usage-metrics \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Total length of sent messages.",
"description": "Total length of sent messages.",
"metricType": "GROUPED",
"eventType": "message_sent",
"aggregationType": "COUNT",
"aggregationProperty": "message_length",
"groupingProperty": "channel",
"unit": "bytes",
"deletedAt": "2022-06-28T16:47:00Z",
"propertyFilters": {
"channels": [
"text",
"email"
]
},
"caseSensitive": true,
"propertiesToNegate": [
"channels"
]
}'
Copy
Ask AI
{
"id": "f092246c-6b90-4106-bcca-304ccf06bf45",
"sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1",
"name": "Total length of sent messages.",
"description": "Total length of sent messages.",
"metricType": "GROUPED",
"eventType": "message_sent",
"aggregationType": "COUNT",
"aggregationProperty": "message_length",
"groupingProperty": "channel",
"unit": "bytes",
"createdAt": "2022-06-28T16:47:00Z",
"deletedAt": "2022-06-28T16:47:00Z",
"propertyFilters": {
"channels": [
"text",
"email"
]
},
"caseSensitive": true,
"propertiesToNegate": [
"channels"
],
"parameters": [
{
"id": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45",
"name": "myParam",
"type": "INTEGER",
"description": "My parameter",
"defaultValue": "10"
}
]
}
Headers
Your API credentials. Eg. Basic {credentials}
.
Use this header to select an API version
Available options:
2024-07-30
Body
application/json
Response
201
application/json
Created
The response is of type object
.
Copy
Ask AI
curl --request POST \
--url https://eu.sequencehq.com/api/usage-metrics \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Total length of sent messages.",
"description": "Total length of sent messages.",
"metricType": "GROUPED",
"eventType": "message_sent",
"aggregationType": "COUNT",
"aggregationProperty": "message_length",
"groupingProperty": "channel",
"unit": "bytes",
"deletedAt": "2022-06-28T16:47:00Z",
"propertyFilters": {
"channels": [
"text",
"email"
]
},
"caseSensitive": true,
"propertiesToNegate": [
"channels"
]
}'
Copy
Ask AI
{
"id": "f092246c-6b90-4106-bcca-304ccf06bf45",
"sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1",
"name": "Total length of sent messages.",
"description": "Total length of sent messages.",
"metricType": "GROUPED",
"eventType": "message_sent",
"aggregationType": "COUNT",
"aggregationProperty": "message_length",
"groupingProperty": "channel",
"unit": "bytes",
"createdAt": "2022-06-28T16:47:00Z",
"deletedAt": "2022-06-28T16:47:00Z",
"propertyFilters": {
"channels": [
"text",
"email"
]
},
"caseSensitive": true,
"propertiesToNegate": [
"channels"
],
"parameters": [
{
"id": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"usageMetricId": "f092246c-6b90-4106-bcca-304ccf06bf45",
"name": "myParam",
"type": "INTEGER",
"description": "My parameter",
"defaultValue": "10"
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.