Usage callbacks
Receive a signed webhook when a team-billed run settles or is released.
Enterprise team owners can configure a signed webhook instead of polling. Under Settings → Teams → (team) → Keys → Usage callback, an owner sets an https:// callback URL, enables it, and receives a signing secret once (it can be rotated, or a test event sent, from the same panel). Key minting on that tab is covered on Teams and team wallets.

The callback host must resolve to a public IP address. Deliveries to private or loopback addresses are not attempted.
Whenever an AI run billed to that team (billed_team_id on the charge) reaches a terminal billing state, Coda POSTs a JSON event to the URL:
usage.settled: the charge settled, includingdebt(partial payment).usage.released: the authorisation hold was refunded.usage.test: a test event sent from the settings panel.
Example payload (field names mirror GET /usage/runs/{run_id}):
Each request carries X-Coda-Signature: t=<unix>,v1=<hmac-sha256-hex>, X-Coda-Event, and X-Coda-Delivery-Id. Verify before trusting:
Deliveries retry up to 20 attempts with exponential backoff starting at 30 seconds and capped at 1 hour (roughly 13 hours total). Deduplicate on event_id. Retries replay the same delivery. A debt event may be followed by a second usage.settled for the same run_id once the debt is collected; use the latest settled_at / charged_credits. status and charged_credits are snapshotted when the event is enqueued. team_remaining reflects the wallet at delivery time.
The usage pull API remains the source of truth. Callbacks are a notification, not the ledger.
user_id on the payload is the actor. API-token identity is not stored.