Skip to content
Keptslot
Start free

Read usage

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

This endpoint gives what THIS workspace used in the current billing period.

There is no maximum beside either number, and that is deliberate. The caps belong to the account and are shared across its workspaces, so a per-workspace maximum would be a number that nothing enforces. A workspace key must not learn about its sibling workspaces. Read the caps with an account key, from GET /v1/account/usage.

The period is given as two dates, not as a month name. An account billed on the 20th has a period that no month names.

This workspace’s usage for the current period.

Media type application/json
object
period_start
required
string format: date
period_end
required
string format: date
bookings_this_month
required

What this workspace contributed to the account total.

integer
sms_credits_used
required

SMS credits this workspace spent. It sums both pots: the monthly allowance and any top-up.

integer
Example generated
{
"period_start": "2026-04-15",
"period_end": "2026-04-15",
"bookings_this_month": 1,
"sms_credits_used": 1
}

The key is missing, malformed or revoked.

Media type application/json
object
error
required
object
type
required

A stable machine-readable code. Match on this.

string
message
required

A sentence for a person. Do not match on this.

string
param

The field that caused the refusal, if one field did.

string
dimension

The plan limit that refused the request. It is present only on a 402, and only for a secret key or an account key. See the errors guide.

string
used

The current count for that dimension. It is present only on a 402, and only for an account key. It is absent when the refusal has no count to report. Absent and zero are different answers.

integer format: int64
limit

The cap for that dimension. It is present only on a 402, and only for an account key. A cap of zero is a real value.

integer format: int64
Example generated
{
"error": {
"type": "example",
"message": "example",
"param": "example",
"dimension": "example",
"used": 1,
"limit": 1
}
}