Read plan, prepaid balance and remaining allowance
GET
/v1/billing/usage
const url = 'https://api.hooks.events/v1/billing/usage';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.hooks.events/v1/billing/usage \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Success
Media typeapplication/json
object
data
required
object
plan
required
string
used
required
Billable requests charged so far
integer
quota
required
Prepaid requests bought, or the Free lifetime grant
integer
remaining
required
integer
rejected
required
integer
lifetime
required
boolean
quantityBlocks
Legacy subscription quantity
integer
prepaidBlocks
required
Cumulative prepaid blocks bought; never decreases
integer
status
required
string | null
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" }}Headers
Section titled “Headers”X-RateLimit-Limit
integer
Requests allowed per window
X-RateLimit-Remaining
integer
X-RateLimit-Reset
integer
Seconds until the window resets