Skip to content

Page through the usage-event ledger

GET
/v1/usage/events
curl --request GET \
--url 'https://api.vocapable.com/v1/usage/events?limit=50' \
--header 'Authorization: Bearer <token>'
limit
Limit
integer
default: 50 >= 1 <= 200
cursor
Any of:
string
call_id
Any of:
string

Filter on call_id. Comma-separated values are OR.

call_id.gte
Any of:
string

Filter on call_id with the gte operator.

call_id.lte
Any of:
string

Filter on call_id with the lte operator.

call_id.gt
Any of:
string

Filter on call_id with the gt operator.

call_id.lt
Any of:
string

Filter on call_id with the lt operator.

call_id.in
Any of:
string

Filter on call_id with the in operator.

campaign_id
Any of:
string

Filter on campaign_id. Comma-separated values are OR.

campaign_id.gte
Any of:
string

Filter on campaign_id with the gte operator.

campaign_id.lte
Any of:
string

Filter on campaign_id with the lte operator.

campaign_id.gt
Any of:
string

Filter on campaign_id with the gt operator.

campaign_id.lt
Any of:
string

Filter on campaign_id with the lt operator.

campaign_id.in
Any of:
string

Filter on campaign_id with the in operator.

meter
Any of:
string

Filter on meter. Comma-separated values are OR.

meter.gte
Any of:
string

Filter on meter with the gte operator.

meter.lte
Any of:
string

Filter on meter with the lte operator.

meter.gt
Any of:
string

Filter on meter with the gt operator.

meter.lt
Any of:
string

Filter on meter with the lt operator.

meter.in
Any of:
string

Filter on meter with the in operator.

occurred_at
Any of:
string

Filter on occurred_at. Comma-separated values are OR.

occurred_at.gte
Any of:
string

Filter on occurred_at with the gte operator.

occurred_at.lte
Any of:
string

Filter on occurred_at with the lte operator.

occurred_at.gt
Any of:
string

Filter on occurred_at with the gt operator.

occurred_at.lt
Any of:
string

Filter on occurred_at with the lt operator.

occurred_at.in
Any of:
string

Filter on occurred_at with the in operator.

Successful Response

Media typeapplication/json
CursorPage[UsageEventSummary]
object
data
required
Data
Array<object>
UsageEventSummary

One ledger row. Append-only - there is no update or delete surface anywhere.

object
id
required
Id
string
meter
required
Meter
string
Allowed values: telephony_minutes stt_audio_seconds tts_characters llm_prompt_tokens llm_cached_prompt_tokens llm_completion_tokens gpu_seconds sms_segments lookup_requests
quantity
required
Quantity
string
/^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$/
call_id
Any of:
string
campaign_id
Any of:
string
occurred_at
required
Occurred At
string format: date-time
rated_amount_minor
Any of:
integer
attributes
Attributes
object
key
additional properties
any
created_at
required
Created At
string format: date-time
next_cursor
Any of:
string
has_more
Has More
boolean
Example
{
"data": [
{
"meter": "telephony_minutes"
}
],
"has_more": false
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}