List an organization's consumption, one event per action
GET/organizations/:organization_id/consumption/events
The raw rows behind GET .../balance: every action a member of the organization made against the platform, one event per action whatever the number of technical calls it fanned out into, with the member who made it, the datasets present in the results it returned, how many entries came back, and the cost the ledger charged (cost, the same envelope every metered response carries). Each job's compute charge is listed too, as an event of kind compute with its own cost line ({currency, compute, total}), in the currency it was charged. Summed per currency, the cost[].total of every event of the feed equals the expenses of GET .../balance. A request refused before it reached the data is neither charged nor listed: a 401, a 403 on a dataset the caller has no access to, or a 402 for a suspended account, a sponsored quota or a sponsored suspension.
If the organization sponsors clients, the same feed lists their sponsored calls (see sponsored on the event), ordered with the organization's own calls under one cursor and watermark. A sponsored event never carries the content of the request, the user is pseudonymized and the cost is the sponsor's own platform fee.
Polling loop for an external accounting system: call without after once, store pageInfo.endCursor, then call with after=<cursor> on every poll and keep the latest cursor. Events are ordered by booking time and ascend inside each kind, an id is never reused but does not ascend across kinds, so deduplicate by equality. Nothing younger than watermark is served, so a cursor never skips an action. The cursor is opaque and holds one position for the calls and one for the compute charges: resume it with the filters it was issued under. A read that serves no compute event (with sponsoredGroupId, with sourceType api or mcp, or with a start, end or userId that matches no compute charge) leaves the compute position where it was, so continuing its cursor without those filters lists earlier compute charges again. A cursor issued before compute events is still accepted, and replays every past compute charge once. Deduplicating by id absorbs these replays.
Requires the caller's access token to carry the invoice:read ability and the caller to hold at least the org-admin role in the target organization (the same gate as .../balance). A client of a sponsor gets 401 on the sponsor's feed.
Request
Responses
- 200
- 400
- 401
- 402
- 404
- 422
One page of events
The organization ID is not a valid integer, or after is not a cursor this endpoint issued (INVALID_PARAMETER, with message "The cursor '
Caller lacks the invoice:read ability or is not at least an org admin in this organization
Payment required. Either the caller's account is temporarily suspended by its organization (error.name is PaymentRequired, error.data.kind is temporary, message is the organization's own text), or the caller's organization has no prepaid credit left for a metered call (no error.data). Or a sponsored read was refused because the sponsor's monthly quota for the caller's subscription is used up, or the sponsor suspended the subscription: message is the text to show (the sponsor's quotaMessage at the quota or suspensionMessage under suspension, or the default). The refusal is free and carries no cost envelope. A request that is refused in full is a 402 carrying the first refusal's message. A permanently suspended account gets 401 with error.name LOCKED and error.data.kind permanent instead.
Resource not found
Validation failed