> For the complete documentation index, see [llms.txt](https://docs.saleschat.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saleschat.pro/api-documentation/rate-limit.md).

# Rate limit

Request limits for the Saleschat APIs. A request over a limit returns HTTP status 429 Too Many Requests.

Every Saleschat API endpoint is rate limited. A request over a limit returns `429 Too Many Requests`.

Which limits apply depends on how the request is authenticated:

* **Organisation API key**: server-to-server calls, such as a CRM integration. These get the org-level limits only.
* **User token**: calls made on behalf of a logged-in user, with that user's bearer token. These must pass both the org-level limits and the logged-in user limits.

## When you hit a limit

A request over a limit returns:

```http
HTTP/1.1 429 Too Many Requests
Retry-After: 1
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1
Content-Type: application/json
```

```json
{
  "error_code": 4290001,
  "error_message": "TOO_MANY_REQUESTS",
  "error_description": "Rate limit exceeded for orgId: YOUR_ORG_ID",
  "payload": {
    "orgId": "YOUR_ORG_ID",
    "remainingRequests": 0,
    "resetTimeSeconds": 1
  }
}
```

`Retry-After`, `X-RateLimit-Reset` and `payload.resetTimeSeconds` all hold the length of the limit's window in seconds: `1` for a per-second limit, `60` for a per-minute limit. Wait that long before you retry.

## Org-level limits

All callers in an organisation share these limits, whichever way they authenticate.

| Endpoint                                                                                                               | Counted per    | Limit                |
| ---------------------------------------------------------------------------------------------------------------------- | -------------- | -------------------- |
| Any endpoint not listed below                                                                                          | org + endpoint | 20 requests / second |
| [Reset password](https://docs.saleschat.pro/api-documentation/user.md): `/v1/org/{orgId}/user/{userId}/password/reset` | org + endpoint | 5 requests / minute  |

The reset password limit replaces the default. It is not added on top of it.

## Logged-in user limits

These apply only to requests made with a user token. API key calls skip them.

| Endpoint                      | Counted per           | Limit                     |
| ----------------------------- | --------------------- | ------------------------- |
| Any endpoint not listed below | org + user + endpoint | 20 requests / second      |
| Reset password                | org + user + endpoint | 5 requests / minute       |
| Report exports                | org + user + report   | 1 request / minute        |
| Analytics exports             | org                   | 2 exports running at once |

**Report exports** are agent performance, team performance, lead engagements, lead aggregated, CSAT, delayed responses, users, campaign audit and automation audit. Each report has its own limit, so a user can export the CSAT report and the users report in the same minute.

**Analytics exports** are inbound analytics, automation analytics, AI analytics, custom dashboards, trends, funnels, funnel people and retention. The limit counts exports in progress across the whole organisation, not per user. If two exports are already running, a third request returns:

```http
HTTP/1.1 429 Too Many Requests
Retry-After: 600
Content-Type: application/json
```

```json
{
  "error_code": 4292301,
  "error_message": "EXPORT_CONCURRENCY_LIMIT",
  "error_description": "This organisation already has 2 exports running. Try again once one has finished.",
  "payload": null
}
```

This response has no `X-RateLimit-*` headers. Wait for one of the running exports to finish, or retry after the number of seconds in `Retry-After`.

## Deprecated endpoints

These limits apply whichever way the request is authenticated.

| Endpoint                                                                                                                           | Counted per | Limit                  |
| ---------------------------------------------------------------------------------------------------------------------------------- | ----------- | ---------------------- |
| [v3 Assign](https://docs.saleschat.pro/deprecated-apis/contact-deprecated.md): `POST /v3/orgs/{orgId}/contacts/{contactId}/assign` | org + lead  | 1 request / 10 seconds |

Use v4 Assign instead: it has no per-lead limit.
