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

# Limits

> Request size, batch, and query limits across the Ingestion API, Data API, dashboard, and CLI.

This page consolidates every customer-visible limit and the exact behavior when you hit it.

## Ingestion API

| Limit | Value | Behavior when exceeded |
| - | - | - |
| Request body (all endpoints) | 5 MB | `413` with `{"success": false, "count": 0, "message": "Request too large", "requestId": "..."}` |
| Events per batch (`/v1/ingest`, `/v1/ingest/multi`) | 1,000 | `400` with `"Batch size exceeds limit of 1000"` |
| Spans per OTLP request (`/v1/traces`) | No count limit — only the 5 MB body cap | `413` |

There are currently no rate limits on the Ingestion API; it does not return `429`. Transient overload surfaces as `503` with `"retryable": true` — retry with backoff. See [Reliability](https://docs.moda.dev/ingestion/reliability.md).

Error envelope on JSON endpoints:

```json theme={"dark"}
{ "success": false, "count": 0, "message": "...", "requestId": "...", "retryable": true }
```

| Status | Meaning |
| - | - |
| 200 | Accepted; `count` is the number of stored rows |
| 400 | Invalid body, event validation failure, batch over 1,000, or invalid `environment` |
| 401 | Missing, invalid, or revoked API key |
| 413 | Body over 5 MB |
| 500 | Internal error |
| 503 | Temporary backpressure — safe to retry (`retryable: true`) |

Unknown paths return a plain-text `404`. An optional `X-Request-ID` header (UUID) is echoed back as `requestId` for correlating requests with responses.

### Environments

Accepted environment values: `development`, `staging`, `production`.

* The request-level `environment` field on `/v1/ingest` and `/v1/ingest/multi` must be exactly one of the three values; anything else returns `400` listing the valid values. It defaults to `production`.
* Environment values carried on OTLP attributes (`moda.environment` span attribute, `deployment.environment` resource attribute) normalize common aliases — `dev`/`develop` → `development`, `stg`/`stage` → `staging`, `prod` → `production` — and unknown values fall back to `production`.

## Data API

Out-of-range numeric parameters are clamped to their maximum — they do not error. Invalid enum values and over-length strings return `400`.

| Parameter | Cap | Behavior when exceeded |
| - | - | - |
| `days_back` | 90 | Clamped |
| `offset` | 10,000 | Clamped |
| `window` (context endpoints) | 5 | Clamped |
| `q` (`/search` query) | 500 characters | `400` |
| `note` (`POST /feedback`) | 4,000 characters | `400` |

Per-endpoint `limit` caps:

| Endpoint | Maximum `limit` |
| - | - |
| Most list endpoints | 100 |
| `/frustrations`, `/emotions`, `/hallucinations` | 20 |
| `/tool-failures/{toolName}` (examples) | 20 |
| `/problems` | 25 |
| `/tools` | 200 |
| `/problems/{id}/reports`, `/problems/{id}/conversations`, `/problems/{id}/evidence` | 50 |

## Dashboard and CLI

**CLI key limit.** Each workspace caps the number of active CLI-created keys (named `CLI - ...`). The default is 10; admins and owners can set it between 1 and 100 in **Settings → Ingestion keys**.

## Next steps

* [Reliability](https://docs.moda.dev/ingestion/reliability.md) — retry guidance and error envelopes in depth.
* [Data API overview](https://docs.moda.dev/data-api/overview.md) — endpoints these clamps apply to.
* [Authentication](https://docs.moda.dev/administration/authentication.md) — key management and revocation timing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.