# Limits

## Rate limits

Limits apply per business and per API. Every response carries `ratelimit-limit`, `ratelimit-remaining` and `ratelimit-reset`; a `429` adds `retry-after` (seconds). Retry after that delay, with exponential backoff if it happens again.

| API | Paths | Limit |
|---|---|---|
| Email and platform | everything else (`/emails`, `/domains`, `/webhooks`…) | 10 requests/second |
| Support (chat) | `/chat/*` | 50 requests/second |
| Payments | `/payments*`, `/einvoices*` | 20 requests/second |
| Agent API (mobile and Mac apps) | `chat.hatang.dev/agent/*` | 300 reads and 60 writes per minute per user |

Sending also counts against the plan's daily email quota (`daily_quota_exceeded`).

## Email

| What | Limit |
|---|---|
| Recipients per email (`to` + `cc` + `bcc`) | 50 |
| Emails per batch request | 1–100 |
| Attachments per email | 50 |
| Whole message (body + attachments) | 40 MB |
| Subject | 998 characters |
| Tags | 50 per email; names and values up to 256 characters of `A–Z a–z 0–9 _ -` |
| `Idempotency-Key` | 256 characters |
| SMTP relay message | 40 MB, 50 recipients |
| Received email (inbound) | 25 MB, 50 attachments kept |

## Support (chat)

| What | Limit |
|---|---|
| Websocket frame | 16 KB |
| Customer message | 4000 characters |
| Agent message | 10000 characters |
| Attachments per message | 5 |
| One attachment | 10 MB |
| Custom visitor data (`identify.data`, `setData`) | 8 KB |
| Messages a customer can send | 5 per 10 seconds, 60 per minute |

More protocol timings (auth timeout, ping, reconnect backoff) are in the [realtime protocol reference](https://hatang.dev/docs/reference/realtime-protocol.md).

Source: https://hatang.dev/docs/reference/limits
