Skip to main content
POST
Batches are atomic. If a single event is invalid, Lago rejects the entire batch with a 422 and persists nothing, including the valid events in the same request. “Invalid” covers a bad schema, an unknown subscription, or a duplicate transaction_id (value_already_exist). The error_details object reports failures by the event’s index in the array you sent, not by transaction_id, so keep your array order to trace an index back to its source event.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Batch events payload

events
object[]
required

The usage events to ingest. An empty list returns a 422 error with no_events, and more than 100 events returns a 422 error with too_many_events.

Required array length: 1 - 100 elements

Response

Event received

events
object[]
required