# Limits

> How much Kabu takes, per minute, per month and per request, on Free and Pro, and what happens at each limit.

Limits keep one agent, or one loop, from flooding a person or an account. They apply to the whole account (the org),
however many keys it has. `GET /v2` returns every limit that applies to your key, under `limits`, and every response
carries `RateLimit-Policy` and `RateLimit` headers.

## Per plan

| | Free | Pro |
|---|---|---|
| Notifications a month | 1,000 | No monthly cap |
| Notifications a minute | 60 | 600 |
| Asks waiting for an answer at once | 50 | 1,000 |
| Requests holding a `wait`, or streams, at once | 20 | 200 |

Every message counts as one notification, a question included. Pro and Business have no monthly cap; very high
volumes may be rate-limited to protect the service. The per-minute limits above still apply.

Past a rate limit, a request is `429` [`rate_limited`](/docs/errors/rate_limited) with `Retry-After`: wait that long
and send the same request again. Past the monthly quota it is `429` [`quota_exceeded`](/docs/errors/quota_exceeded)
with no `Retry-After`, because retrying will not help until the next month or a bigger plan. Answering, cancelling and
reading never count against sending.

## Per person

However many agents and accounts reach you, Kabu protects your attention:

- more than 30 notifications to you in 10 minutes are gathered into a digest instead of each buzzing your phone;
- at most 20 of your asks wait at once, and at most 10 from one agent. A further ask is accepted, and its expiry
  runs, but it reaches you only when one of the others settles;
- an agent that sends 20 near-identical messages in a minute is paused for 10 minutes, and you are told once.

## Per request

| What | Limit |
|---|---|
| Request body | 64 KiB of JSON |
| `title`, `body` | 120 and 8,192 characters |
| Confirm buttons, choice options, form fields | 4, 12 and 10 |
| Blocks, attachments, links, recipients | 10, 10, 4 and 20 |
| A file | 25 MiB with `POST /v2/media`, 2 GiB with `POST /v2/media/uploads` |
| `?wait=` | 50 seconds |
| A page of a list | 100 items |
| Webhook replay | 7 days and 100,000 events back |

Over a limit, a request is refused before anything happens: `400` [`invalid_request`](/docs/errors/invalid_request),
or `413` [`payload_too_large`](/docs/errors/payload_too_large) for a body or file that is too big.
