Ingest & summaries
Ingest CostMessage
Universal ingest — single envelope or batch (max 100).
POST
Requires permission
You may also send a JSON array of envelopes (1–100).
201 (batch):
log_usage. Auto-upserts the project by slug. Idempotent when idempotency_key is set.
Project slug (auto-created if missing)
api | mcp | manual | import (default api)Dedup key within the workspace
ISO datetime for the event
Discriminated CostMessage — see CostMessage
Responses
201 (single)Ledger row UUID
Resolved USD amount
Project UUID
ISO timestamp
{ "messages": [ ...same objects... ] }
| Status | Meaning |
|---|---|
400 | Invalid JSON |
401 / 403 | Auth / permission |
500 | Validation or persist failure |
