Skip to content

Get the billing state

GET
/v1/billing
curl --request GET \
--url https://api.overwatch.weareheavy.dev/v1/billing \
--header 'Authorization: Bearer <token>'

The account’s billing state for the current period: every site’s metered usage against its per-app allowances, which apps are currently paused at their allowance, and the projected bill. Session-only, owner/admin.

The current period’s allowances, usage, paused apps, and projected bill.

Media typeapplication/json
object
period
required

The current UTC billing period, YYYY-MM.

string
overageEnabled
required

Whether the account has opted in to overage billing.

boolean
allowances
required
object
includedSites
required
integer
pagesCrawled
required

Monthly crawl allowance per site.

integer
pagesRendered
required

Monthly accessibility-render allowance per site.

integer
monitorsPerSite
required
integer
includedMonitors
required

The org’s total included monitors.

integer
counts
required
object
sites
required
integer
extraSites
required

Sites beyond the included count (billed with overage on).

integer
monitors
required
integer
extraMonitors
required
integer
sites
required
Array<object>
object
siteId
required
string format: uuid
hostname
required
string
pagesCrawled
required
integer
pagesRendered
required
integer
monitors
required
integer
crawlPaused
required

The scheduler is skipping crawls for the rest of the period.

boolean
a11yPaused
required

The scheduler is skipping accessibility scans for the rest of the period.

boolean
bill
required

The projected bill for the period, itemized.

object
Examplegenerated
{
"period": "example",
"overageEnabled": true,
"allowances": {
"includedSites": 1,
"pagesCrawled": 1,
"pagesRendered": 1,
"monitorsPerSite": 1,
"includedMonitors": 1
},
"counts": {
"sites": 1,
"extraSites": 1,
"monitors": 1,
"extraMonitors": 1
},
"sites": [
{
"siteId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"hostname": "example",
"pagesCrawled": 1,
"pagesRendered": 1,
"monitors": 1,
"crawlPaused": true,
"a11yPaused": true
}
],
"bill": {}
}

Missing or invalid credentials.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "invalid api key"
}

A dashboard session is required (API-key callers are rejected), or the session’s role does not allow this action.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "a dashboard session is required"
}