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

# Rate limits

> Request limits per project, the RateLimit headers and how to react to a 429.

Routa limits requests per **project** to protect the platform. The limits use the *token bucket* algorithm: you have a bucket with a burst capacity that refills at a constant rate.

## Default limits

| Class | Endpoints | Sustained rate | Burst |
| - | - | - | - |
| Sends | `POST /v1/messages` | 50 req/s | 100 |
| Writes | Other data API `POST`, `PATCH` and `PUT` | 20 req/s | 40 |
| Reads | Every `GET` | 100 req/s | 200 |

The values apply per project. If your operation needs more, talk to Routa: raising a project's limit is a configuration change, not a deploy.

The [Partner API](https://docs.routa.chat/en/partners/overview.md) has its own limit, **per organization**: 10 req/s sustained, with a burst of 30, adding up all the `/v1/partner/*` routes. This value cannot be raised per project.

> [!NOTE]
>
> Sending a message only consumes the **sends** limit. It does not compete for tokens with your reads.

## Response headers

The `RateLimit-*` headers come on **every** response, not only on rejected ones, so you can adjust your pace before you get a `429`.

| Header | Description |
| - | - |
| `RateLimit-Limit` | Sustained rate of the class, in requests per second. |
| `RateLimit-Remaining` | Tokens left in the bucket. |
| `RateLimit-Reset` | Seconds until the bucket refills. |
| `Retry-After` | Only on `429`: seconds to wait before trying again. |

## The 429 response

```http theme={null}
HTTP/1.1 429 Too Many Requests
RateLimit-Limit: 50
RateLimit-Remaining: 0
RateLimit-Reset: 1
Retry-After: 1
Content-Type: application/json
```

```json theme={null}
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded for sends. Retry after 1 second(s).",
    "request_id": "req_01J8..."
  }
}
```

### How to react

**1. Respect Retry-After**

Wait at least the number of seconds given before you try again.

**2. Use exponential backoff with jitter**

If several processes are limited at the same time, add random variation so they do not retry together.

**3. Slow down at the source**

Use `RateLimit-Remaining` to space out batch sends. For large campaigns, queue on your side.

The Node.js SDK already retries `429` automatically, with exponential backoff, jitter and respect for `Retry-After`. See [Configuration](https://docs.routa.chat/en/sdk/configuration.md).

## Provider limits: Routa absorbs them

WhatsApp enforces its own send limits per number. You do **not** need to manage them: Routa absorbs them in the queue. A message that was already accepted never turns into a `429` error because of a provider limit. It waits in the queue and gets sent. You notice latency, not failure.

## Channel backlog

If the queue of a channel grows far beyond what it can drain, Routa refuses new sends to **that channel** with `429` and the `channel_backlog_exceeded` code. It is an honest signal: accepting more work would mean promising a deadline that cannot be met. The limit is high and per channel. Try again in a moment.

## Body size

Every request body has a limit, checked before the body is read.

| Route | Limit |
| - | - |
| JSON routes in general | 1 MiB |
| Media upload (`POST /v1/media`, `POST /v1/templates/media`) | 100 MiB (the limit per file type is lower, see [Media](https://docs.routa.chat/en/concepts/media.md)) |

Above the limit, the API returns `413 payload_too_large`.


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