Skip to content

Usage history by month

GET
/v1/usage/history
curl --request GET \
--url https://api.pomeloanalytics.com/v1/usage/history \
--header 'Authorization: Bearer <token>'

Requires usage:read scope. Tokens with metrics:read also have implicit access to this endpoint.

X-Request-Id
string

Optional idempotency/request correlation identifier.

from
string format: date

Inclusive UTC start date (YYYY-MM-DD). Defaults to last 7 days.

to
string format: date

Inclusive UTC end date (YYYY-MM-DD). Defaults to today.

OK

Media typeapplication/json
object
items
required
Array<object>
object
period
required
string
units_used
required
integer
units_included
required
integer
units_overage
required
integer
hard_cap_units
required
integer
Example
{
"items": [
{
"period": "2026-01"
}
]
}
X-Request-Id
string

Request identifier for troubleshooting.

Invalid or revoked API token.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHORIZED FORBIDDEN INVALID_METHOD INVALID_PARAMS RETENTION_EXCEEDED RATE_LIMITED HARD_CAP_REACHED REPORT_LOCKED_BY_PROFILE REPORT_NOT_AVAILABLE_FOR_REQUESTED_PERIOD REPORT_RESPONSE_TOO_LARGE INTERNAL_ERROR NOT_FOUND
message
required
string
request_id
required
string
details
object
key
additional properties
any
Example
{
"error": {
"code": "UNAUTHORIZED"
}
}
X-Request-Id
string

Request identifier for troubleshooting.

Token scope/site/plan does not allow this request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHORIZED FORBIDDEN INVALID_METHOD INVALID_PARAMS RETENTION_EXCEEDED RATE_LIMITED HARD_CAP_REACHED REPORT_LOCKED_BY_PROFILE REPORT_NOT_AVAILABLE_FOR_REQUESTED_PERIOD REPORT_RESPONSE_TOO_LARGE INTERNAL_ERROR NOT_FOUND
message
required
string
request_id
required
string
details
object
key
additional properties
any
Example
{
"error": {
"code": "UNAUTHORIZED"
}
}
X-Request-Id
string

Request identifier for troubleshooting.

Request parameters are invalid.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHORIZED FORBIDDEN INVALID_METHOD INVALID_PARAMS RETENTION_EXCEEDED RATE_LIMITED HARD_CAP_REACHED REPORT_LOCKED_BY_PROFILE REPORT_NOT_AVAILABLE_FOR_REQUESTED_PERIOD REPORT_RESPONSE_TOO_LARGE INTERNAL_ERROR NOT_FOUND
message
required
string
request_id
required
string
details
object
key
additional properties
any
Example
{
"error": {
"code": "UNAUTHORIZED"
}
}
X-Request-Id
string

Request identifier for troubleshooting.

Request was throttled.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHORIZED FORBIDDEN INVALID_METHOD INVALID_PARAMS RETENTION_EXCEEDED RATE_LIMITED HARD_CAP_REACHED REPORT_LOCKED_BY_PROFILE REPORT_NOT_AVAILABLE_FOR_REQUESTED_PERIOD REPORT_RESPONSE_TOO_LARGE INTERNAL_ERROR NOT_FOUND
message
required
string
request_id
required
string
details
object
key
additional properties
any
Example
{
"error": {
"code": "UNAUTHORIZED"
}
}
X-Request-Id
string

Request identifier for troubleshooting.

X-RateLimit-Limit
integer

Maximum requests allowed during current short window.

X-RateLimit-Remaining
integer

Remaining requests in current short window.

X-RateLimit-Reset
integer

Unix timestamp when short window resets.