Per-day consumption and the credit ledger
GET
https://server.heyrik.com/api/v1/usageHeaders
AuthorizationstringRequiredUse Bearer $HEYRIK_API_KEY with an account-scoped API key. Keep the key on your server.
Parameters 3
Fields documented for this operation. See the request example for placement and structure.
daysnumberWindow size. Default 30.
fromstringISO start date (use with until).
untilstringISO end date.
Response
Explore the example values. This is not a complete response schema.
dataobjectExplore 4 properties
periodobjectExplore 3 properties
credits_usednumberExample 218.267
minutesnumberExample 54.5
callsnumberExample 83
by_dayarrayExplore 1 example item
[0]objectExplore 4 properties
datestringExample "2026-07-22"
creditsnumberExample 12.45
minutesnumberExample 3.1
callsnumberExample 5
credits_per_minutenumberExample 4
recordsarrayExplore 1 example item
[0]objectExplore 4 properties
kindstringExample "call"
creditsnumberExample 2.9167
secondsnumberExample 37
notestringExample "call 37s — 2.4667 platform + 0.45 carrier"
GET/usage
cURL
curl "https://server.heyrik.com/api/v1/usage?days=30" \
-H "Authorization: Bearer $HEYRIK_API_KEY"Response example
JSON
{
"data": {
"period": { "credits_used": 218.267, "minutes": 54.5, "calls": 83 },
"by_day": [
{ "date": "2026-07-22", "credits": 12.45, "minutes": 3.1, "calls": 5 }
],
"credits_per_minute": 4,
"records": [
{
"kind": "call",
"credits": 2.9167,
"seconds": 37,
"note": "call 37s — 2.4667 platform + 0.45 carrier"
}
]
}
}Illustrative examples · No live request is sent
