Skip to content

Read plan, prepaid balance and remaining allowance

GET
/v1/billing/usage
curl --request GET \
--url https://api.hooks.events/v1/billing/usage \
--header 'Authorization: Bearer <token>'

Success

Media typeapplication/json
object
data
required
object
plan
required
string
Allowed values: free pro scale
used
required

Billable requests charged so far

integer
>= -9007199254740991 <= 9007199254740991
quota
required

Prepaid requests bought, or the Free lifetime grant

integer
>= -9007199254740991 <= 9007199254740991
remaining
required
integer
>= -9007199254740991 <= 9007199254740991
rejected
required
integer
>= -9007199254740991 <= 9007199254740991
lifetime
required
boolean
quantityBlocks

Legacy subscription quantity

integer
>= -9007199254740991 <= 9007199254740991
prepaidBlocks
required

Cumulative prepaid blocks bought; never decreases

integer
>= -9007199254740991 <= 9007199254740991
periodStart
required
Any of:

ISO-8601 timestamp

string
periodEnd
required
Any of:

ISO-8601 timestamp

string
status
required
string | null
graceEndsAt
required
Any of:

ISO-8601 timestamp

string
cancelAtPeriodEnd
required
boolean
limits
object
key
additional properties
key
additional properties
key
additional properties

Example

{
"data": {
"plan": "free"
}
}

Validation error

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example"
}
}

Missing or invalid credentials

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example"
}
}

The credential lacks the required scope, or the workspace is not writable

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example"
}
}

Rate limited

Media typeapplication/json
object
error
required
object
code
required

Machine-readable error code

string
message
required
string
requestId
required

Request id, also echoed in x-request-id

string
key
additional properties

Example generated

{
"error": {
"code": "example",
"message": "example",
"requestId": "example"
}
}
X-RateLimit-Limit
integer

Requests allowed per window

X-RateLimit-Remaining
integer
X-RateLimit-Reset
integer

Seconds until the window resets