Synchronously ingest billable events

View as Markdown
Accepts a single billable event and inserts it synchronously into the database.

Authentication

AuthorizationBearer
API key obtained from the Grant dashboard

Request

This endpoint expects an object.
event_namestringRequired1-255 characters
Name of the event
idempotency_keystringRequired1-255 characters
Unique key to prevent duplicate event processing
customer_idstringRequiredformat: "cuid"
Customer identifier
timestampdatetimeRequired

Event timestamp in ISO 8601 UTC format (Z or +00:00)

session_idstringOptional1-255 characters
Optional session identifier. When provided, it is persisted on the billable event and associated product usage events to group related events.
propertiesmap from strings to anyOptional
Additional event properties

Response

Events processed synchronously
successboolean
statusenum
Processing outcome for the submitted event
request_idstring
Request ID for tracing
usage_idstringOptional
Created or existing billable event ID
costlist of objectsOptional
Aggregated event cost by wallet denomination. Present on successful requests.
customer_balanceslist of objectsOptional
Current customer wallet balances across denominations after ingestion.
errorobjectOptional

Errors

400
Bad Request Error
401
Unauthorized Error
413
Content Too Large Error
429
Too Many Requests Error
500
Internal Server Error