Usage
Submit usage events
Submit up to 100 usage events in a single request. Each event is validated against the contract's pricing program, persisted, rated immediately, and the corresponding invoice is updated. Events are idempotent — submitting the same `event_id` twice returns success without creating a duplicate.
AuthorizationBearer <token>
API key as Bearer token: Authorization: Bearer luc_live_...
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://api.lucius.finance/v1/billing/usage" \ -H "Content-Type: application/json" \ -d '{ "events": [ { "external_contract_id": "acme-corp-2026", "event_id": "evt-2026-03-001", "metric": "revenue_amount_invoiced", "quantity": 10000, "timestamp": "2026-03-25T12:00:00.000Z" } ] }'{
"accepted": 1,
"rejected": 0,
"events": [
{
"event_id": "evt-2026-03-001",
"status": "accepted"
}
]
}{
"error": "Missing API key"
}