Skip to content
Anlyon
Esc
↑↓navigate↵open⌘Jpreview

Get current billing period usage

Retrieve usage statistics for the current billing period

GET/api/v2/billing/usage/current
Authorization
AuthorizationBearer token (Anlyon API key) · headerrequired

Workspace API key sent as Authorization: Bearer <key>.

or
better-auth.session_tokenAPI key · cookierequired

Browser session used by dashboard-only operations.

Header parameters
X-Request-Idstring

Optional caller correlation ID. Unsafe or oversized values are replaced.

max length 128
Responses
200

Current calendar-month usage and estimated cost returned.

successbooleanrequired
Allowed:true
dataobjectrequired
Show properties
currentMonthMessagesintegerrequired
min 0
currentMonthBandwidthintegerrequired

Bytes., example: 52428800

min 0
dailyMessagesintegerrequired
min 0
estimatedCostnumberrequired

Estimated cost in major currency units., example: 0.05

min 0
billingPeriodStartstring<date-time>required
billingPeriodEndstring<date-time>required
usageResetDatestring<date-time>required
401

Unauthorized - Invalid or missing API key

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
403

Authenticated credential lacks the required scope or workspace access.

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
404

Not Found - Resource does not exist

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
429

Too Many Requests - Rate limit exceeded

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.anlyon.com/api/v2/billing/usage/current' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "success": true,
  "data": {
    "currentMonthMessages": 5000,
    "currentMonthBandwidth": 0,
    "dailyMessages": 120,
    "estimatedCost": 0,
    "billingPeriodStart": "2019-08-24T14:15:22Z",
    "billingPeriodEnd": "2019-08-24T14:15:22Z",
    "usageResetDate": "2019-08-24T14:15:22Z"
  }
}