Skip to main content
POST
/
events
/
batch
Track multiple events in a batch
curl --request POST \
  --url https://api.engagefabric.com/events/batch \
  --header 'Content-Type: application/json' \
  --data '
{
  "events": [
    {
      "projectId": "123e4567-e89b-12d3-a456-426614174000",
      "externalUserId": "user_12345",
      "eventType": "lesson_completed",
      "properties": {
        "lessonId": "math-101",
        "score": 95,
        "duration": 300
      },
      "timestamp": "2025-11-17T10:30:00Z",
      "idempotencyKey": "evt_user12345_lesson_20251117_103000"
    }
  ]
}
'
{
  "accepted": 10,
  "rejected": 2,
  "skipped": 1,
  "results": [
    {
      "eventId": "123e4567-e89b-12d3-a456-426614174000",
      "status": "PENDING",
      "skipped": false,
      "message": "Event queued for processing",
      "existingEventId": "<string>"
    }
  ]
}

Body

application/json
events
object[]
required

Array of events to track

Response

Batch accepted for processing

accepted
number
required

Number of events accepted

Example:

10

rejected
number
required

Number of events rejected

Example:

2

skipped
number
required

Number of events skipped (duplicates)

Example:

1

results
object[]
required

Results for each event