Skip to main content
Events are the raw usage records that metrics aggregate. Send them as customers do things in your product. See Usage metering for how to design them.

Send events

Send one event, an array of events, or an object with an events array:

Event fields

Response

accepted lists the IDs of stored events. rejected lists events that failed validation, with the reason, so you can fix and resend them.

List events

When no time range is given, the list covers the last 30 days.

Backfill events

To load historical usage, send the events to POST /v1/events/backfill. Use it for past periods, not for live traffic. Send live events to POST /v1/events.

Query events

POST /v1/events/query runs a query over stored events. Use it to explore your data. Billing is computed from metrics, not from ad-hoc queries.