Skip to main content

POST /api/v1/events/batch

Submit an array of events for batch ingestion. All events are processed asynchronously. Maximum 100 events per request.

Request Body

events
array
required
Array of event objects. Each object follows the same schema as the single event endpoint.

Response

Returns 202 Accepted:
{
  "events": [
    { "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "status": "queued" },
    { "id": "a2c3d4e5-6f7a-8b9c-0d1e-2f3a4b5c6d7e", "status": "queued" },
    { "id": "b3d4e5f6-7a8b-9c0d-1e2f-3a4b5c6d7e8f", "status": "duplicate" }
  ]
}
Each event in the response includes its pre-generated id and a status of either queued or duplicate.

Examples

curl -X POST https://getimmutable.dev/api/v1/events/batch \
  -H "Authorization: Bearer imk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      {
        "actor_id": "user_2hG9kLm",
        "actor_name": "Sarah Chen",
        "action": "document.created",
        "resource_id": "doc_8nXpQr3",
        "resource_name": "Q4 Financial Report"
      },
      {
        "actor_id": "user_2hG9kLm",
        "actor_name": "Sarah Chen",
        "action": "document.shared",
        "resource_id": "doc_8nXpQr3",
        "resource_name": "Q4 Financial Report",
        "targets": [
          { "type": "team", "id": "team_5bR7cNx", "name": "Engineering" }
        ]
      },
      {
        "actor_id": "user_9pK3mNq",
        "actor_name": "James Rivera",
        "action": "comment.added",
        "resource_id": "doc_8nXpQr3",
        "metadata": {
          "comment_id": "cmt_7xL2bRw",
          "body": "Looks good, approved."
        }
      }
    ]
  }'

Limits

  • Maximum 100 events per batch request.
  • Each event counts toward your workspace’s monthly event quota.
  • Validation errors for individual events do not prevent other events in the batch from being processed.
Batch events are assigned created_at timestamps offset by 1 microsecond per event to preserve insertion order within the hash chain. This ensures correct chain verification.