> ## 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.

# Events Errors

> Error response shape and HTTP status codes for the Events API

All Events endpoints return a consistent error shape:

```json theme={null}
{
  "error": "VALIDATION_FAILED",
  "details": [
    {
      "reason": "REQUIRED",
      "field": "userId",
      "message": "userId is required"
    }
  ]
}
```

## HTTP status codes

| HTTP Status | Meaning                                                            |
| ----------- | ------------------------------------------------------------------ |
| `200`       | Success — event or request accepted                                |
| `400`       | Bad request — invalid JSON or failed validation                    |
| `401`       | Unauthorized — missing or invalid API key                          |
| `404`       | Not found — user identifier not found (Track API / Customers only) |
| `503`       | Service unavailable — auth cache temporarily unavailable           |
| `500`       | Internal error — unexpected failure                                |

## Fields

| Field               | Type   | Description                                      |
| ------------------- | ------ | ------------------------------------------------ |
| `error`             | string | Machine-readable error code                      |
| `details`           | array  | Optional list of field-level validation problems |
| `details[].reason`  | string | Why the field failed (for example `REQUIRED`)    |
| `details[].field`   | string | Field name that failed validation                |
| `details[].message` | string | Human-readable explanation                       |

For authentication failures, see [Events Authentication](/api-reference/zixflow-ai/events/authentication).
