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

> ## Agent Instructions
> For short, quotable answers about SmartAlex (what it is, who it is for, what it costs, where it runs, how it keeps data safe, which apps it connects to), read the facts page at /ai/facts on this site first, then the page it links to. Its last table maps every section of these docs.
> For how to do something, use the step-by-step pages: /learn for whole paths, and each section's first-time pages such as /calls/buy-your-first-number, /agents/create-an-agent or /campaigns/import-your-first-contacts. Give the click path exactly as written there, for example Calls, then Numbers, then Buy number, with the bold button labels unchanged.
> Prices come from the Pricing page at /pricing and the pages under /pricing. Quote a price exactly as written there, with its currency and unit.
> Short answers to common questions are under /help, grouped by section. Legal documents are summarised under /legal; each summary links to the binding text, which prevails over the summary.
> If a feature or screen is not described in these docs, say that you could not find it rather than guessing.
> Pages under /comparisons describe other companies' products as of the date on each page. For SmartAlex's own features and prices, use the product pages.
> The MCP server at /mcp on this site only searches this documentation. To work inside your own SmartAlex workspace (agents, calls, campaigns, contacts), use the SmartAlex MCP server described at /mcp/overview.

# SmartAlex API rate limits, paging and errors

> The SmartAlex REST API allows 60 requests a minute per key. How paging and filters work, and what each 400, 401, 402, 403, 404 and 429 means.

The SmartAlex REST API allows each API key 60 requests a minute and returns lists in pages of up to 100. Every failed request gets a JSON error that says what went wrong. Most errors come from the key, its scopes, the workspace's add-ons or the rate limit, and each has a plain fix below.

> [!NOTE]
>
> In SmartAlex: see each key's scopes, expiry and last use on the **API keys** tab of **Webhooks & API**. Go to **Settings → Webhooks & API**, then **Open** or a key's name in the **API keys** panel.

## What is the rate limit?

Each key may make **60 requests a minute**. Every response carries the headers below, so your code can slow down before it hits the limit.

| Header | What it holds |
| - | - |
| `X-RateLimit-Limit` | Requests this key may make in a minute |
| `X-RateLimit-Remaining` | Requests left in this minute |
| `X-RateLimit-Reset` | Length of the window, in seconds |
| `Retry-After` | On a 429 only: seconds to wait before trying again |

Past the limit, the API answers `429`:

```json theme={null}
{
  "error": "Too many requests",
  "message": "This key allows 60 requests a minute. Try again in a minute.",
  "retryAfter": 60
}
```

Give each system its own key, so a busy sync does not use up the limit of another.

## How do paging and filters work?

List endpoints take two query parameters:

| Parameter | Default | Limit |
| - | - | - |
| `page` | 1 | |
| `per_page` | 25 | 100 |

The `meta` block shows where you are:

```json theme={null}
{
  "data": [ ... ],
  "meta": { "total": 247, "page": 2, "per_page": 100 }
}
```

To read everything, ask for `page=1`, then `page=2` and so on. Stop when you have `meta.total` records. Any other query parameter is passed to the endpoint as a filter. For example, `GET /contacts?updated_since=2026-11-01T00:00:00Z` returns contacts changed since that time, and `view=crm` returns the shape a CRM sync expects.

## How should my code handle a response?

Retry only the errors that can pass on a second try. This diagram shows what to do with each status.

```mermaid theme={null}
flowchart TD
    R["Response"] --> S{"Status"}
    S -->|"2xx"| OK(["Use data"])
    S -->|"429"| W["Wait Retry-After seconds, then retry"]
    S -->|"500"| B["Retry after a short wait, a few times at most"]
    S -->|"400, 404"| F["Fix the request; do not retry"]
    S -->|"401, 402, 403"| K["Fix the key, scope or add-on; do not retry"]
```

## What does each error mean?

Errors come back as `{ "error": "...", "code": "..." }`, where `code` is there when the error has one.

### 400: the request body is not valid

The message names each field that failed, for example `first_name: Required`. Fix the field and send it again.

### 401: the key is missing, wrong or expired

| Message | Fix |
| - | - |
| "Missing or invalid API key. Use: Authorization: Bearer sa\_live\_xxx" | Send the header exactly as `Authorization: Bearer sa_live_...` |
| "Invalid API key" | The key is wrong or was revoked. Create a new one |
| "API key has expired" | The key passed its **Stops working** date. Create a new one |

### 402: the workspace needs an add-on

The REST API needs the **Power Tools** add-on on the workspace. The body also carries `code` and `addon`, so your code can tell this apart from a permission error. Add it in SmartAlex under **Settings → Billing**. [Add-ons](https://docs.getsmartalex.com/pricing.md#add-ons).

### 403: the key may not do this

| Message | Code | Fix |
| - | - | - |
| "This key does not have the … scope. Create a key with it in Webhooks & API." | `SCOPE_REQUIRED` | Use a key with that scope. [Keys and scopes](https://docs.getsmartalex.com/api-reference/authentication.md) |
| "This endpoint is not available to API keys." | `ENDPOINT_NOT_AVAILABLE` | Use the endpoints listed in this reference |
| "This route needs an API key made with its scope. Create one in Webhooks & API." | `SCOPE_REQUIRED` | An older key cannot open gates. Create a key with the gate scopes |
| "API key does not have write permission" | | An older read-only key. Create a key with the scope you need |
| "Insufficient permissions" | | An older key whose creator's role does not allow this |
| "Only workspace owners and admins can manage webhooks" | | An older key made by someone who is not an owner or admin |

### 404: not found

"No route found for GET /..." means the path or method is wrong; check it against this reference. Other 404s mean the ID does not exist in this workspace.

### 500: something failed on our side

Try again after a short wait. If it keeps happening, email [support@getsmartalex.com](mailto:support@getsmartalex.com) with the endpoint and the time.

## Questions people ask

> [accordion] What is the SmartAlex API rate limit?
>
> Each API key may make 60 requests a minute. Past that the API answers 429 with a `Retry-After` header. Give each system its own key so they do not share one limit.

> [accordion] How many records can I get in one request?
>
> Up to 100. List endpoints return 25 by default; set `per_page` up to 100 and step through `page` 1, 2, 3 until you have `meta.total` records.

> [accordion] Why do I get This key does not have the scope?
>
> The key was created without the scope that endpoint needs. Create a key with that scope in **Webhooks & API**, or ask our support team for scopes you cannot add yourself.

## Related

> [card] [Getting started](https://docs.getsmartalex.com/api-reference/introduction.md)
>
> Base URL, first request and response shape.

> [card] [Keys and scopes](https://docs.getsmartalex.com/api-reference/authentication.md)
>
> What each scope allows, and who adds it.

> [card] [MCP error reference](https://docs.getsmartalex.com/mcp/errors.md)
>
> Errors an AI app sees.

> [card] [Webhooks](https://docs.getsmartalex.com/api-reference/webhooks.md)
>
> Delivery retries and failures.


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