Usage

Batch ingest usage events (max 1000, all-or-nothing)

The batch is atomic: every event validates, then all of them commit in one transaction. On any validation failure NOTHING is ingested, so retrying the whole batch is always safe — including for events without idempotency keys. Replays of already-ingested keys are counted in deduplicated and are NOT errors.

post/v1/usage-events/batch

Request

  • Base URL: http://localhost:8080
  • URL: http://localhost:8080/v1/usage-events/batch
  • Auth: HTTP bearer

Request body

external_customer_idstring required

The customer's external_id (your identifier), not the internal vlx_cus_ id.

event_namestring required

The meter key (e.g. "tokens").

dimensionsobject
idempotency_keystring
timestampstring date-time

Response

Batch committed

ingestedinteger

Newly written events.

deduplicatedinteger

Idempotency replays — already ingested, counted as success.

totalinteger

Changes