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

# How Rate Limiting Works

Every person and every API key gets its own allowance, counted operation by operation.

{% hint style="warning" %}
**Rate limits are rolling out environment by environment.** You may already see `RateLimit` and `RateLimit-Policy` headers on API responses; that is the limiter measuring, not refusing. Refusals (`429 Too Many Requests`) begin separately in each environment. Build your [429 handling](https://docs.durohub.com/rate-limits/handling-429s.md) now so nothing changes for your integration on the day enforcement reaches it.
{% endhint %}

Rate limits keep one runaway script from slowing the API down for everyone else, including your own colleagues. They are sized so that a well-behaved integration never notices them. This section explains how they are counted, lists [every budget and its limits](https://docs.durohub.com/rate-limits/budgets.md), and shows how to [handle a refusal](https://docs.durohub.com/rate-limits/handling-429s.md).

## Four rules

Every number in this section follows from these.

### 1. Budgets belong to each person and each key

Limits follow whoever makes the call. Each signed-in person, and each API key, gets your plan's full budget for your organization's data. A team of five hundred has the same room per person as a team of five, and there is no organization-wide ceiling that a large team has to share.

### 2. Operations count, requests don't

A request is charged once per **operation** it runs, not once per HTTP request. An operation is a field under a namespace such as `component` or `changeOrders` (`component.findOne`, `changeOrders.addItems`), or a root field with no namespace (`libraries`).

```graphql
query ThreeParts {
  component {
    first: findOne(id: "COMPONENT_ID_1") { id name }
    second: findOne(id: "COMPONENT_ID_2") { id name }
    third: findOne(id: "COMPONENT_ID_3") { id name }
  }
}
```

This costs three tokens: aliases are charged once each. Putting several operations in one request saves round trips, not budget. Fields you select *inside* an operation's result are free; only the operations themselves are counted. `__typename` costs nothing, and a field skipped with `@skip` or `@include` is not charged.

### 3. Bursts are welcome, floods are not

Each budget is a bucket you can spend all at once, which then refills steadily. A page load that fires forty queries is fine. Forty a second for an hour is not.

### 4. A refused request costs nothing

If any operation in a request is over its budget, the whole request is refused before anything runs. Nothing is written, and no tokens are taken from the budgets that still had room.

## Every budget is a token bucket

A budget of 600 per minute is a bucket that holds 600 tokens and refills continuously at 10 per second. Each operation takes one token. When the bucket is empty, the next operation has to wait for the refill.

There is no reset at the top of the minute, so there is no boundary to time your traffic around. The bucket size is your burst; the refill rate is your sustained speed. An integration that sits idle for a minute can then spend a whole minute's budget in a second.

## Who a budget is charged to

Each operation belongs to exactly one budget, and each budget is charged to one of three things.

| Scope                   | Charged to                                                                        | Budgets                                                                                                                |
| ----------------------- | --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Per user or API key** | One signed-in person, or one API key, inside the organization the request acts on | Almost all of them: every operation on your organization's components, BOMs, change orders, files, imports and exports |
| **Per user**            | The person, the same in every organization and on every plan                      | `user-read`, `user-write`: your own profile, settings and memberships                                                  |
| **Per organization**    | One allowance shared by everyone in the organization                              | `api-keys`, `invite`: organization administration                                                                      |

A few consequences worth knowing:

* **Your organization's plan sets the size** of every per-user-or-key budget. Someone who belongs to two organizations gets each organization's limits for that organization's data, and traffic in one never drains the other.
* **An API key and its owner's web session have separate budgets** for organization data. An integration running under your key does not slow you down in the web app. Your personal `user-read` and `user-write` budgets are the exception: they are shared by you and every key you own.
* **An API key's budget is its user's, per library.** Two keys created by the same user for the same library share one budget. Keys for different libraries, or created by different users, each have their own.
* **An API key's limits come from its library's organization.** That organization's plan sizes the key's budget. Send `x-organization` on every request as usual.

## Two budgets cover almost everything

Most operations have no specific limit and draw on one of two defaults:

| Budget          | Covers                                                                                                       | Free      | Standard  | Premium     |
| --------------- | ------------------------------------------------------------------------------------------------------------ | --------- | --------- | ----------- |
| `default-read`  | Every query without a budget of its own                                                                      | 120 / min | 600 / min | 3,000 / min |
| `default-write` | Every mutation without a budget of its own, such as `component.update` or `vendorSourcing.saveLibraryVendor` | 24 / min  | 120 / min | 600 / min   |

About eight in ten operations in the schema use these two. The rest — searches, BOM reads and writes, bulk writes, change-order workflow steps, imports, exports, file transfers, AI features — do more work per call, so each draws on a [budget of its own](https://docs.durohub.com/rate-limits/budgets.md#operation-budgets). Heavy work in one area never starves ordinary reads and writes in another.

## See the limit in Apollo Explorer

Every operation with its own budget says so in its schema description, so you can read it in [Apollo Explorer](https://api.durohub.com/graphql), GraphiQL, or your codegen output:

> **Rate limit:** `bom-read` budget, 60/min per user or API key on Standard, 300/min on Premium (plan defaults; your organization's limit may differ). Every response's `RateLimit-Policy` header shows the limit that applies to you.

The root `Query` and `Mutation` types describe the `default-read` and `default-write` budgets the same way. These are plan defaults; the response headers show the limit that applies to you.

## Every response tells you where you stand

Charged responses carry two headers in the [IETF RateLimit header fields](https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/) format:

```http
RateLimit-Policy: "default-read";q=600;w=60
RateLimit: "default-read";r=599;t=1
```

| Field            | Meaning                                                             |
| ---------------- | ------------------------------------------------------------------- |
| `"default-read"` | The budget being described                                          |
| `q`              | The budget's size: tokens per window, the limit that applies to you |
| `w`              | The window, in seconds                                              |
| `r`              | Tokens remaining after this request                                 |
| `t`              | Seconds until the bucket is full again                              |

When a request touches more than one budget, the headers describe the one closest to running out. Header names are case-insensitive; many HTTP clients print them in lowercase.

Treat the headers as advisory: they are absent on requests that charge nothing (such as `{ __typename }`) and may occasionally be missing. See [Handling 429s](https://docs.durohub.com/rate-limits/handling-429s.md#pace-yourself-with-the-headers) for using them to slow down before you are ever refused.

## Sign-in is limited differently

Before anyone is signed in there is no organization to charge, so the account APIs under `/auth/*` have limits of their own that don't depend on any plan.

* **Signing in and resetting a password** are counted per account from each IP address, with a cap per IP address ten times higher. Nobody elsewhere can use up your attempts, and an office signing in together at nine o'clock is fine.
* **Signing up and verifying an email address** are counted per IP address. See [Creating an Account](https://docs.durohub.com/account-management/creating-an-account.md#rate-limits) for the numbers.
* **Single sign-on** start and completion each allow about 100 sign-ins per IP address in 5 minutes. A larger office signing in together is slowed, not refused. See [Enterprise SSO](https://docs.durohub.com/account-management/enterprise-sso.md#rate-limits) for the numbers.

Past a limit, each further attempt is answered a little more slowly. Only far past it is a request refused, with `429` and the code `AUTH_RATE_LIMITED`. That response is a flat JSON body, not a GraphQL error, and it carries the wait in both a `retryAfter` field and a `Retry-After` header:

```json
{
  "code": "AUTH_RATE_LIMITED",
  "message": "Too many attempts. Wait a moment and try again",
  "retryAfter": 300
}
```

Accounts are never locked: a limit slows an attacker down without letting anyone lock you out.

## Higher limits

**Premium** raises every organization budget, most of them five times over Standard.

If an integration needs more than your plan allows, such as a one-time migration of a full parts catalogue, contact your Duro account team. Limits can be raised for your organization alone, for just the budgets you need, without changing your plan. A raise applies to every user and every API key in your organization for your organization's operations. It never changes the per-user `user-read` and `user-write` budgets, which are the same for everyone. The `RateLimit-Policy` header always shows the limit in force for you.

## Next steps

* [Budget Reference](https://docs.durohub.com/rate-limits/budgets.md): every budget, its operations, and its limits on each plan
* [Handling 429s](https://docs.durohub.com/rate-limits/handling-429s.md): the refusal response, a retry helper, and pacing
* [Error Handling](https://docs.durohub.com/advanced-topics/error-handling.md): every other error the API returns


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.durohub.com/rate-limits/rate-limits.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
