- Explore demo
- Speak to an expert
- Changelog
- Blog
Account
Billing
Collections
Customers
Invoices
Notifications & Webhooks
Product
Seats
Taxes
Usage
Version 2024-05-09
Version 2024-01-01
Latest API
All API versions
List all Usage Metrics
List all Usage Metrics
Your API credentials. Eg. Basic {credentials}
.
Maximum number of objects to return per-page.
Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from pagination.after
or pagination.before
to retrieve each page.
Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from pagination.next
or pagination.previous
to retrieve each page.
curl --request GET \
--url https://eu.sequencehq.com/api/usage-metrics \
--header 'Authorization: <authorization>'
{
"items": [
{
"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"
}
]
}
],
"pagination": {
"after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
"before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
"totalResultSize": 10
}
}
Headers
Your API credentials. Eg. Basic {credentials}
.
Query Parameters
Maximum number of objects to return per-page.
Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from pagination.after
or pagination.before
to retrieve each page.
Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from pagination.next
or pagination.previous
to retrieve each page.
Response
Usage metrics
Unique ID
Sequence Account ID
Human-readable name for this metric, which should be unique
Description for this metric
Type of metric (simple or grouped)
SIMPLE
, GROUPED
The eventType
of the Usage Event to be aggregated
Type of aggregation to perform
COUNT
, UNIQUE
, SUM
, CUSTOM
Human-readable unit of the aggregated metric, eg. API calls)
Created at
Created at
Required parameters
INTEGER
, POSITIVE_INTEGER
Results pagination
Cursor for the page after this (if it exists)
Cursor for the page before this (if it exists)
Total number of entries across all pages
curl --request GET \
--url https://eu.sequencehq.com/api/usage-metrics \
--header 'Authorization: <authorization>'
{
"items": [
{
"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"
}
]
}
],
"pagination": {
"after": "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
"before": "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
"totalResultSize": 10
}
}