# Rate limits

When a route's limit is exceeded the API answers `429` with the standard error envelope
(`error: rate_limited`, see [`/docs/errors#rate_limited`](https://api.bind.co/docs/errors#rate_limited)),
a `Retry-After` header with the seconds until the window resets, and the limit in `hint`:

```json
{
  "error": "rate_limited",
  "error_description": "Too many requests: this route allows 60 per minute.",
  "error_uri": "https://api.bind.co/docs/errors#rate_limited",
  "fault": "client_problem",
  "hint": {"limit": "60 per 1 minute", "retry_after_seconds": 23},
  "request_id": "req_xxxxxxxxxx"
}
```

Wait `Retry-After` seconds, then retry; back off exponentially if you keep hitting it.

Every answer from a limited route carries the budget you have left, so you can slow down
before you reach a `429`. That includes errors such as a `401` or a `412`: an answer refused before
the limit was counted shows the full window.

| Header | Meaning |
|--------|---------|
| `X-RateLimit-Limit` | Requests the window allows |
| `X-RateLimit-Remaining` | Requests left in the current window |
| `X-RateLimit-Reset` | When the window resets, in Unix seconds |
| `X-RateLimit-Resource` | The family the route counts against: `read`, `write` and so on (below) |

Counts are kept by each server instance, so these numbers are approximate. Browsers can read every
one of these headers, as well as `Retry-After`, `X-Request-Id`, `ETag`, `Location`, `Deprecation`,
`Sunset` and `Link`.

## Webhook budgets

Counted per application (or per endpoint), rolling one-minute window; the reply is the same
`429` envelope with `hint.limit_per_minute`.

| Action | Limit |
|--------|-------|
| `POST /v1/webhook-endpoints/{public_id}/test` (per endpoint) | 10 per minute |
| `POST /v1/webhook-deliveries/{public_id}/redeliver` and `POST /v1/webhook-events/{public_id}/redeliver` (per application) | 60 per minute |
| Active webhook endpoints (per application) | 10 — a `409 conflict`, not a rate limit |

## Per-route limits

Counted per application and user: each user your application acts for has their own budget,
and another application's traffic never uses yours. `POST /oauth2/token`, `/oauth2/revoke` and
`/oauth2/introspect` are counted per application (the `client_id` you authenticate with); the
consent pages, called before a user is signed in, per calling IP address. Fixed window. Counts are kept by each server instance, so a limit is
approximate: you may get a few more requests than the table says before a `429`. This table is
generated from the running API, so it is always current for the routes in the
[API reference](https://api.bind.co/docs/reference). The webhook event-type list is outside the reference; its limit
is stated in the [webhooks guide](https://api.bind.co/docs/webhooks). Limits may tighten; the `429` envelope and
`Retry-After` are the contract, not the numbers.

Every route in the API reference belongs to one family: `sign_in`, `token`, `read` or
`write`; only these guide pages and static files have none. The
table shows each family's standard limit; your application's limit for a family may be set
differently, and the `X-RateLimit-Limit` header always carries the one that applies to you. A few
routes also carry a fixed second limit, listed after the family's.

Most routes are counted per URL as called: today `GET /v1/contacts/{contact_id}` for two different
contacts draws on two separate counts. Do not plan on a budget per record; this can change, and
the `429` is the contract.

All routes under `/v1/operations/{type}/` (every operation type, reads and writes) share one budget
per application and user: at the standard limits, 60 requests per minute in total. The limit in
their rows is that shared budget, not one each.

| Route | Methods | Family | Limit |
|-------|---------|--------|-------|
| `/.well-known/oauth-authorization-server` | GET | `read` | 60 per 1 minute |
| `/oauth2/authorize` | GET | `sign_in` | 60 per 1 minute |
| `/oauth2/authorize/preflight` | GET | `read` | 60 per 1 minute |
| `/oauth2/introspect` | POST | `token` | 60 per 1 minute |
| `/oauth2/revoke` | POST | `token` | 60 per 1 minute |
| `/oauth2/token` | POST | `token` | 60 per 1 minute |
| `/v1/.well-known/oauth-authorization-server` | GET | `read` | 60 per 1 minute |
| `/v1/contacts` | GET | `read` | 60 per 1 minute |
| `/v1/contacts` | POST | `write` | 60 per 1 minute |
| `/v1/contacts/search` | POST | `read` | 60 per 1 minute |
| `/v1/contacts/{contact_id}` | GET | `read` | 60 per 1 minute |
| `/v1/contacts/{contact_id}` | PATCH | `write` | 60 per 1 minute |
| `/v1/contacts/{contact_id}/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/contacts/{contact_id}/email-addresses/{email_address}/company` | POST | `write` | 60 per 1 minute |
| `/v1/contacts/{contact_id}/merge` | POST | `write` | 60 per 1 minute |
| `/v1/contacts/{contact_id}/primary-email` | POST | `write` | 60 per 1 minute |
| `/v1/contacts/{contact_id}/reject` | POST | `write` | 60 per 1 minute |
| `/v1/contacts/{contact_id}/reset` | POST | `write` | 60 per 1 minute |
| `/v1/contacts/{contact_id}/restore` | POST | `write` | 60 per 1 minute |
| `/v1/contacts/{contact_id}/suggestions` | GET | `read` | 60 per 1 minute |
| `/v1/contacts/{contact_id}/unmerge` | POST | `write` | 60 per 1 minute |
| `/v1/drafts` | GET | `read` | 60 per 1 minute |
| `/v1/drafts/count` | GET | `read` | 60 per 1 minute |
| `/v1/drafts/goals` | GET | `read` | 60 per 1 minute |
| `/v1/drafts/goals` | POST | `write` | 60 per 1 minute |
| `/v1/drafts/goals/available-roles` | GET | `read` | 60 per 1 minute |
| `/v1/drafts/goals/{goal_id}` | DELETE | `write` | 60 per 1 minute |
| `/v1/drafts/goals/{goal_id}` | GET | `read` | 60 per 1 minute |
| `/v1/drafts/goals/{goal_id}` | PATCH | `write` | 60 per 1 minute |
| `/v1/drafts/{draft_id}` | GET | `read` | 60 per 1 minute |
| `/v1/drafts/{draft_id}` | PATCH | `write` | 60 per 1 minute |
| `/v1/drafts/{draft_id}/later` | POST | `write` | 60 per 1 minute |
| `/v1/drafts/{draft_id}/reject` | POST | `write` | 60 per 1 minute |
| `/v1/drafts/{draft_id}/save` | POST | `write` | 60 per 1 minute |
| `/v1/drafts/{draft_id}/send` | POST | `write` | 60 per 1 minute |
| `/v1/emails/{email_id}/web-link` | GET | `read` | 60 per 1 minute |
| `/v1/oauth2/authorize` | GET | `sign_in` | 60 per 1 minute |
| `/v1/oauth2/authorize/preflight` | GET | `read` | 60 per 1 minute |
| `/v1/oauth2/clients/me` | GET | `read` | 60 per 1 minute |
| `/v1/oauth2/introspect` | POST | `token` | 60 per 1 minute |
| `/v1/oauth2/revoke` | POST | `token` | 60 per 1 minute |
| `/v1/oauth2/token` | POST | `token` | 60 per 1 minute |
| `/v1/operations` | GET | `read` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses` | POST | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/chaser/outreach-approval` | GET | `read` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/chaser/owner-escalation` | GET | `read` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/chaser/self-help` | GET | `read` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/search` | POST | `read` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}` | DELETE | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}` | GET | `read` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}` | PATCH | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/chaser` | GET | `read` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/chaser/outreach-approval/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/chaser/outreach-approval/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/chaser/owner-escalation/dismiss` | POST | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/chaser/self-help/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/chaser/self-help/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/merge` | POST | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/reset` | POST | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/restore` | POST | `write` | 60 per 1 minute |
| `/v1/operations/cra-eligible-expenses/{operation_id}/unmerge` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses/chaser/outreach-approval` | GET | `read` | 60 per 1 minute |
| `/v1/operations/expenses/chaser/owner-escalation` | GET | `read` | 60 per 1 minute |
| `/v1/operations/expenses/chaser/self-help` | GET | `read` | 60 per 1 minute |
| `/v1/operations/expenses/search` | POST | `read` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}` | DELETE | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}` | GET | `read` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}` | PATCH | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/chaser` | GET | `read` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/chaser/outreach-approval/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/chaser/outreach-approval/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/chaser/owner-escalation/dismiss` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/chaser/self-help/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/chaser/self-help/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/merge` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/reset` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/restore` | POST | `write` | 60 per 1 minute |
| `/v1/operations/expenses/{operation_id}/unmerge` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/chaser/outreach-approval` | GET | `read` | 60 per 1 minute |
| `/v1/operations/payroll-operations/chaser/owner-escalation` | GET | `read` | 60 per 1 minute |
| `/v1/operations/payroll-operations/chaser/self-help` | GET | `read` | 60 per 1 minute |
| `/v1/operations/payroll-operations/search` | POST | `read` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}` | DELETE | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}` | GET | `read` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}` | PATCH | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/chaser` | GET | `read` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/chaser/outreach-approval/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/chaser/outreach-approval/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/chaser/owner-escalation/dismiss` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/chaser/self-help/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/chaser/self-help/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/merge` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/reset` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/restore` | POST | `write` | 60 per 1 minute |
| `/v1/operations/payroll-operations/{operation_id}/unmerge` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/chaser/outreach-approval` | GET | `read` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/chaser/owner-escalation` | GET | `read` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/chaser/self-help` | GET | `read` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/search` | POST | `read` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}` | DELETE | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}` | GET | `read` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}` | PATCH | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/chaser` | GET | `read` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/chaser/outreach-approval/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/chaser/outreach-approval/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/chaser/owner-escalation/dismiss` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/chaser/self-help/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/chaser/self-help/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/merge` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/reject` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/reset` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/restore` | POST | `write` | 60 per 1 minute |
| `/v1/operations/purchase-loan-financing/{operation_id}/unmerge` | POST | `write` | 60 per 1 minute |
| `/v1/operations/{operation_type}/schema` | GET | `read` | 60 per 1 minute |
| `/v1/profile/company-profile/{company_id}` | GET | `read` | 60 per 1 minute |
| `/v1/profile/company-profile/{company_id}` | PATCH | `write` | 60 per 1 minute |
| `/v1/profile/company-profile/{company_id}/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/profile/company-profile/{company_id}/reset` | POST | `write` | 60 per 1 minute |
| `/v1/profile/company-profile/{company_id}/suggestions` | GET | `read` | 60 per 1 minute |
| `/v1/profile/company/search` | POST | `read` | 60 per 1 minute |
| `/v1/profile/company/{company_id}` | GET | `read` | 60 per 1 minute |
| `/v1/profile/company/{company_id}` | PATCH | `write` | 60 per 1 minute |
| `/v1/profile/user` | GET | `read` | 60 per 1 minute |
| `/v1/profile/user` | PATCH | `write` | 60 per 1 minute |
| `/v1/profile/user-profile` | GET | `read` | 60 per 1 minute |
| `/v1/profile/user-profile` | PATCH | `write` | 60 per 1 minute |
| `/v1/profile/user-profile/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/profile/user-profile/reset` | POST | `write` | 60 per 1 minute |
| `/v1/profile/user-profile/suggestions` | GET | `read` | 60 per 1 minute |
| `/v1/roles` | GET | `read` | 60 per 1 minute |
| `/v1/roles` | POST | `write` | 60 per 1 minute |
| `/v1/roles/families` | GET | `read` | 60 per 1 minute |
| `/v1/roles/search` | POST | `read` | 60 per 1 minute |
| `/v1/roles/{role_id}` | GET | `read` | 60 per 1 minute |
| `/v1/roles/{role_id}` | PATCH | `write` | 60 per 1 minute |
| `/v1/roles/{role_id}/confirm` | POST | `write` | 60 per 1 minute |
| `/v1/roles/{role_id}/reject` | POST | `write` | 60 per 1 minute |
| `/v1/roles/{role_id}/reset` | POST | `write` | 60 per 1 minute |
| `/v1/roles/{role_id}/restore` | POST | `write` | 60 per 1 minute |
| `/v1/roles/{role_id}/suggestions` | GET | `read` | 60 per 1 minute |
| `/v1/webhook-deliveries` | GET | `read` | 60 per 1 minute |
| `/v1/webhook-deliveries/{public_id}` | GET | `read` | 60 per 1 minute |
| `/v1/webhook-deliveries/{public_id}/redeliver` | POST | `write` | 60 per 1 minute |
| `/v1/webhook-endpoints` | GET | `read` | 60 per 1 minute |
| `/v1/webhook-endpoints` | POST | `write` | 60 per 1 minute |
| `/v1/webhook-endpoints/{public_id}` | DELETE | `write` | 60 per 1 minute |
| `/v1/webhook-endpoints/{public_id}` | GET | `read` | 60 per 1 minute |
| `/v1/webhook-endpoints/{public_id}` | PATCH | `write` | 60 per 1 minute |
| `/v1/webhook-endpoints/{public_id}/rotate-secret` | POST | `write` | 60 per 1 minute |
| `/v1/webhook-endpoints/{public_id}/test` | POST | `write` | 60 per 1 minute |
| `/v1/webhook-events` | GET | `read` | 60 per 1 minute |
| `/v1/webhook-events/{public_id}` | GET | `read` | 60 per 1 minute |
| `/v1/webhook-events/{public_id}/redeliver` | POST | `write` | 60 per 1 minute |
