# Rate limits & quotas

- Page: https://bytesms.com/docs/rate-limits (markdown: https://bytesms.com/docs/rate-limits.md)
- API base URL: https://api.bytesms.com/api (public resources under /api/v1)
- Auth: `Authorization: Bearer tp_live_…` — an API key from Dashboard → API Keys; keep it server-side (e.g. `BYTESMS_API_KEY`)
- All docs in one file: https://bytesms.com/llms-full.txt · OpenAPI 3.1: https://bytesms.com/openapi.json

Bytesms per-workspace request rate limits, daily and monthly email quotas, and what happens over the quota (prepaid credit, 402 insufficient_credits).

## Request rate limit

The public API allows **10 requests per second per workspace** by default. All API keys of a workspace share the same budget, and it covers every `/api/v1` endpoint, MCP `tools/call` requests and SMTP messages. Every `/api/v1` response carries the current state:

**Response headers**

```
ratelimit-limit: 10
ratelimit-remaining: 7
ratelimit-reset: 1
```

`ratelimit-reset` is the number of seconds until the window resets. Over the limit, the API answers `429 rate_limit_exceeded` with a `retry-after` header (seconds). Need more throughput? Use [batch sends](https://bytesms.com/docs/emails#batch) (up to 100 emails per request) or contact support.

## Email quotas

Quotas count **recipients**, not API calls: an email to 3 addresses in `to` plus 2 in `cc` uses 5. Every accepted transactional email counts from the moment it is accepted (queued, scheduled, sent, delivered, bounced, …); only emails that end `failed` or `canceled`give their quota back. The check and the insert are atomic, so parallel requests can't overshoot.

| Limit | Window | Error when exceeded |
| --- | --- | --- |
| Daily limit (e.g. 100/day on Free) | UTC calendar day | `429 daily_quota_exceeded` |
| Monthly quota (e.g. 3,000 on Free) | Free: UTC calendar month. Paid: your billing period. | `429 monthly_quota_exceeded` |
| Over-quota recipients on a paid plan, when the prepaid credit can't cover them | Per request | `402 insufficient_credits` |

Plan limits are listed on the [pricing page](https://bytesms.com/pricing). Broadcast emails don't count toward the transactional quota — Marketing plans limit contacts instead (see [Broadcasts](https://bytesms.com/docs/broadcasts)).

### Over the monthly quota

On Free, sending stops at the quota (`429 monthly_quota_exceeded`). On a paid plan, sending continues past the quota and every over-quota recipient is paid from the workspace's prepaid credit at the plan's per-recipient price — no bucket rounding (see [Credits & billing](https://bytesms.com/docs/credits)). When the credit can't cover a request (after auto-recharge, if it is on), the request is refused with `402 insufficient_credits`:

**Response**

```json
{
  "statusCode": 402,
  "message": "Not enough prepaid credit. Top up (or turn on auto-recharge) in the dashboard under Settings → Billing.",
  "name": "insufficient_credits",
  "neededThb": 0.155,
  "availableThb": 0.04
}
```

`neededThb` is what this request would cost, `availableThb` the balance left. Nothing is sent and nothing is charged; retry after a top-up. Over [SMTP](https://bytesms.com/docs/smtp) the same condition is a temporary `452 4.3.1` reply, so mail servers queue and retry.

### Scheduled and batch sends

- A scheduled email counts toward the period it is scheduled to be sent in, and is checked again when it goes out.
- A batch is all-or-nothing: if the batch's recipients don't fit (quota or prepaid credit), no email in it is accepted.

## Other limits

| Limit | Value |
| --- | --- |
| Recipients per email (to + cc + bcc) | 50 |
| Emails per batch request | 100 |
| How far ahead `scheduled_at` may be | 30 days |
| Tags per email | 50 |
| Idempotency-Key length / retention | 256 characters / 24 hours |
| Request body size | 8 MiB |
| SMTP message size | 10 MB |

> **Note: Warm-up and automatic pauses**
>
> New domains may be subject to a daily warm-up ramp that raises their volume day by day. Workspaces with high bounce or complaint rates are paused automatically (`403 sending_paused`) to protect deliverability for everyone.
