Skip to main content
POST
/
v1
/
events
/
batch
Ingest events in batch
curl --request POST \
  --url https://api.scrip.dev/v1/events/batch \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "events": [
    {
      "event_data": {},
      "event_timestamp": "2024-01-15T10:30:00Z",
      "idempotency_key": "order-12345-completed",
      "program_id": "550e8400-e29b-41d4-a716-446655440000",
      "external_id": "user_abc123",
      "participant_id": "550e8400-e29b-41d4-a716-446655440000",
      "recipient_external_id": "user_xyz789",
      "recipient_id": "550e8400-e29b-41d4-a716-446655440001"
    }
  ]
}
'
{
  "error_count": 1,
  "results": [
    {
      "error": "invalid program_id",
      "event": {
        "event_timestamp": "2023-11-07T05:31:56Z",
        "external_id": "<string>",
        "id": "<string>",
        "idempotency_key": "<string>",
        "participant_id": "<string>",
        "program_id": "<string>",
        "status": "<string>"
      },
      "index": 0,
      "status": "accepted"
    }
  ],
  "success_count": 9,
  "total": 10
}

Documentation Index

Fetch the complete documentation index at: https://docs.scrip.dev/llms.txt

Use this file to discover all available pages before exploring further.

Submits up to 100 events in a single request. Each event in the batch is validated 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. Processing happens asynchronously after acceptance. Batch ingestion follows the same semantics as single-event ingestion. Each event requires an idempotency_key scoped to its program_id. Duplicate keys with identical payloads return the original event; duplicate keys with different payloads return an error for that item. Check individual event statuses via the get event endpoint or by polling the list endpoint with the relevant filters.
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