Skip to main content
POST
Usage log

Authorizations

Authorization
string
header
required

API key secret (starts with s_live_). Create keys in the dashboard under Settings → API keys, or via POST /v1/api-keys/. Send it as Authorization: Bearer <secret>.

Body

application/json

Request model for the usage log.

from_date
string<date-time>
required

Start of the query range (ISO 8601).

to_date
string<date-time>
required

End of the query range (ISO 8601). Must be after from_date, at most 90 days later.

interval
enum<string> | null

Time bucket size for the log rows.

Available options:
hour,
day,
month
cursor
string | null

pagination_metadata.next_cursor from the previous page.

limit
integer
default:20

Entries per page (1-100).

Required range: 1 <= x <= 100
order_by
string | null

Column to sort by. Prefix with - for descending order. Default: -date. Any other column needs a range of at most 31 days, or a package_ids filter.

exclude_columns
string[] | null

Columns to omit from each entry.

package_ids
string[] | null

Restrict results to these package IDs.

network_types
string[] | null

Restrict results to network types: residential and/or mobile.

tiers
integer[] | null

Restrict results to tiers (1, 2, or 3).

countries
string[] | null

Restrict results to these ISO country codes.

target_addresses
string[] | null

Restrict results to traffic sent to these domains.

include_total
boolean
default:false

Return pagination_metadata.total. Adds query cost.

Response

Successful Response

data
UsageLogEntry · object[]
required
pagination_metadata
PaginationMetadata · object
required

Cursor pagination metadata.