> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zixflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch

> Send multiple events in a single HTTP request

#### Description

Send multiple events in a single HTTP request. SDKs queue events locally and flush them as a batch. Prefer `/batch` over individual calls when sending many events from a server.

Short alias: `POST /v1/b`

**Limits:**

* Minimum: 1 item per batch
* Maximum: 100 items per batch
* Items are processed concurrently

Group and Alias are **not supported**. Do not include `type: "group"` or `type: "alias"` in the batch.

#### Headers

<ParamField header="Authorization" type="string" required placeholder="Basic <base64(api_key:)>">
  HTTP Basic Auth. See [Events Authentication](/api-reference/zixflow-ai/events/authentication).
</ParamField>

<ParamField header="Content-Type" type="string" required default="application/json">
  Must be `application/json`.
</ParamField>

#### Body

<ParamField body="batch" type="array" required>
  Array of event objects. Each item must include a `type` field and the fields for that event type.
</ParamField>

<ParamField body="sentAt" type="string" placeholder="2026-05-04T10:00:30.000Z">
  When the batch was sent, as ISO 8601.
</ParamField>

#### Batch item `type` values

| Type       | Equivalent endpoint                                         | Notes                       |
| ---------- | ----------------------------------------------------------- | --------------------------- |
| `identify` | [`/v1/identify`](/api-reference/zixflow-ai/events/identify) | Uses `traits`               |
| `track`    | [`/v1/track`](/api-reference/zixflow-ai/events/track)       | Uses `event` + `properties` |
| `screen`   | [`/v1/screen`](/api-reference/zixflow-ai/events/screen)     | Uses `name` + `properties`  |
| `page`     | [`/v1/page`](/api-reference/zixflow-ai/events/page)         | Uses `name` + `properties`  |

Each batch item shares the same fields as its corresponding individual endpoint, plus a `type` field. Each item may also include an optional [`context`](/api-reference/zixflow-ai/events/context) object.

#### Response

Successful requests return `HTTP 200` with an empty JSON object.

<ResponseExample>
  ```json 200-Success theme={null}
  {}
  ```

  ```json 400-Bad Request theme={null}
  {
    "error": "VALIDATION_FAILED",
    "details": [
      {
        "reason": "REQUIRED",
        "field": "batch",
        "message": "batch is required"
      }
    ]
  }
  ```

  ```json 401-Unauthorised theme={null}
  {
    "error": "UNAUTHORIZED",
    "details": []
  }
  ```
</ResponseExample>

#### Example request body

```json theme={null}
{
  "batch": [
    {
      "type": "identify",
      "userId": "user_12345",
      "traits": { "plan": "enterprise" }
    },
    {
      "type": "track",
      "userId": "user_12345",
      "event": "Plan Upgraded",
      "properties": { "from_plan": "pro", "to_plan": "enterprise" }
    },
    {
      "type": "screen",
      "userId": "user_12345",
      "name": "Home"
    }
  ],
  "sentAt": "2026-05-04T10:00:30.000Z"
}
```
