Preview — pending review
This reference is generated from the platform API contract and is still under review. Operations, fields, and descriptions can change before publication.
Download the credit grant's consumption history as CSV
Streams a CSV export of the referenced credit grant's ledger history — the initial grant
row followed by every top-up/consume event, oldest-first, with its running remaining balance. The
download does not mutate the credit grant.
Validation: creditId must reference an existing credit grant visible in the scope (otherwise
404 NOT_FOUND); the caller must hold a billing-capable role in the scope (otherwise 403 FORBIDDEN).
Async & state: Synchronous read; no state change. The CSV is rebuilt from the live ledger and
streamed inline; no Operation is created and no resource.updated SSE frames are emitted.
Errors: 401 unauthenticated; 403 caller lacks billing read permission in the scope; 404 unknown
creditId in the scope; 500 internal failure.
Idempotency/Concurrency: Safe, cacheable; no idempotency key required. Repeated downloads
return byte-identical CSVs for an unchanged ledger.
bearerTokenAuthorizationBearer <token>An API token (pc_live_…) or a service-account key (sak_live_…), created in Identity & Access Management and sent as Authorization: Bearer <token>. Requests are rate limited per credential and per tenant: every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, and a refused request gets 429 RATE_LIMITED with Retry-After.
scopeId*stringOpaque ownership+authorization scope resolving to tenant + subscription + project.
creditId*stringIdentifier of the credit grant whose consumption history is downloaded.
CSV export of the grant's ledger history (grant row + every top-up/consume event, oldest-first).
response?unknowntext/csvcurl -X GET "https://example.com/scopes/string/billing/credits/string/exports/download"null