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

# Events API Overview

> Complete reference for the Atlas Events API — high-throughput event ingestion for iGaming operations.

## Base URL

```
https://events.atlas.io
```

## Authentication

<Tabs>
  <Tab title="API Key (Domain Events)">
    Used for all `/api/v1/*` endpoints.

    ```http theme={null}
    X-API-Key: atl_live_xxxxxxxxxxxxxxxx
    ```

    Get your API key at [Dashboard → Settings → API Keys](https://app.atlas.io/settings/api).
  </Tab>

  <Tab title="JWT Bearer (Generic Events)">
    Used for `/v1/events` and `/v1/events/batch`.

    ```http theme={null}
    Authorization: Bearer <jwt_token>
    ```

    Obtain a token via [POST /auth/login](https://api.atlas.io/auth/login).
  </Tab>
</Tabs>

## Endpoints

### Domain Event Endpoints

| Method | Path                        | Description                   |
| ------ | --------------------------- | ----------------------------- |
| `POST` | `/api/v1/user`              | Single user event             |
| `POST` | `/api/v1/user/batch`        | Batch user events (up to 500) |
| `POST` | `/api/v1/transaction`       | Single transaction event      |
| `POST` | `/api/v1/transaction/batch` | Batch transaction events      |
| `POST` | `/api/v1/casino`            | Single casino bet event       |
| `POST` | `/api/v1/casino/batch`      | Batch casino events           |
| `POST` | `/api/v1/sport`             | Single sport bet event        |
| `POST` | `/api/v1/sport/batch`       | Batch sport events            |

### Generic Event Endpoints

| Method | Path               | Description                      | Auth |
| ------ | ------------------ | -------------------------------- | ---- |
| `POST` | `/v1/events`       | Single generic event             | JWT  |
| `POST` | `/v1/events/batch` | Batch generic events (up to 500) | JWT  |

### Health Endpoints

| Method | Path            | Description                  |
| ------ | --------------- | ---------------------------- |
| `GET`  | `/health/live`  | Liveness probe (Kubernetes)  |
| `GET`  | `/health/ready` | Readiness probe (Kubernetes) |

## Response Codes

| Code  | Meaning                                      |
| ----- | -------------------------------------------- |
| `202` | Event(s) accepted and published to Kafka     |
| `207` | Batch partial success — check `failed` count |
| `400` | Validation error — entire batch rejected     |
| `401` | Invalid or missing API key / token           |
| `422` | Business rule violation                      |
| `429` | Rate limit exceeded                          |
| `502` | Kafka publish failure — event routed to DLQ  |

## OpenAPI Specification

The full OpenAPI 3.0 spec is available for download and import:

* **Download:** [openapi/events.v3.json](/openapi/events.v3.json)
* **Version:** OpenAPI 3.0.3
* **Source:** generated from the Swagger 2.0 spec produced by swaggo

Import into Postman, Insomnia, or any OpenAPI-compatible tool.

## SDK Support

For JavaScript/TypeScript integrations, use the [Atlas SDK](/sdk/javascript/overview) instead of calling the API directly.

→ `npm install @atlas-platform/sdk`
