Skip to main content
POST
Ingest events in batch
Submits up to 100 events in a single request. Each event in the batch is accepted and processed independently. Individual events can succeed or fail without affecting the others. The response returns 202 Accepted with total, success_count, error_count, and a results array in the same order as the input. Each result has a status of accepted or error. Failed entries carry a machine-readable error_code (e.g. validation_error, bad_request, program_not_found) and a human-readable error message; accepted entries include the full event object. Shape and validation errors are reported per event in this response; valid events are still accepted and processed even when siblings fail. Business validation and processing happen asynchronously after acceptance. A 400 is returned only when the batch envelope itself is malformed (unparseable JSON, zero events, or more than 100 events).
Batch ingestion follows the same semantics as single-event ingestion. Each event requires an idempotency_key scoped to its program_id. Duplicate keys return the same event identity without reprocessing. To correct or replace an event, use a new idempotency key. Check individual event statuses via the get event endpoint or by polling the list endpoint with the relevant filters. As with single-event ingestion, accepted IDs may briefly 404 until Scrip finishes recording them; poll until each ID resolves.
For usage patterns and examples, see the Event Processing guide.

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Body

application/json

Batch of events

events
object[]
required

Events is a list of events to ingest (max 100 per request).

Required array length: 1 - 100 elements

Response

Batch accepted for async processing

error_count
integer

ErrorCount is the number of events that failed

Example:

1

results
object[]

Results contains the outcome for each event

success_count
integer

SuccessCount is the number of events successfully ingested

Example:

9

total
integer

Total is the number of events in the request

Example:

10