# Get your rate limits

Page: https://sandbox.myclaimhouse.com/docs/api/getRateLimits

`GET /api/v1/rate_limits`

The rate limits of the key's organization as they apply to it now: for each bucket (the key, the organization, payer and registry calls, each office) the steady rate a second and the burst, and whether Claim House set the organization's own figures. Test and live have the same limits, each mode with buckets of its own. A 429 TOO_MANY_REQUESTS names the bucket and the same figures in its details. Ask Claim House to raise a limit.

Needs a key with `read` permission.

## Request

This request takes no parameters and no body.

## Response

The organization's effective limits. Status `200`.

| Name | Type | Description |
| --- | --- | --- |
| `object` | string | Always `rate_limits`. |
| `mode` | string | The mode of the key that asked. Test and live have the same limits, and buckets of their own. One of: `test`, `live`. |
| `limits` | object |  |
| `limits.key` | object | Per API key: Every request of the key. |
| `limits.key.per_second` | number | Turns the bucket refills a second: the steady rate. |
| `limits.key.burst` | integer | Turns the bucket holds: how many requests may go at once after a quiet spell. At least -9007199254740991. |
| `limits.key.custom` | boolean | True when Claim House set this organization's own limit; false for the standard 20 a second (bursts of up to 40). |
| `limits.organization` | object | Per organization: Every request of all its keys of one mode (test and live each have their own). |
| `limits.organization.per_second` | number | Turns the bucket refills a second: the steady rate. |
| `limits.organization.burst` | integer | Turns the bucket holds: how many requests may go at once after a quiet spell. At least -9007199254740991. |
| `limits.organization.custom` | boolean | True when Claim House set this organization's own limit; false for the standard 50 a second (bursts of up to 100). |
| `limits.network` | object | Payer and registry calls: Eligibility checks and NPI lookups of the organization in one mode, on top of the two above. |
| `limits.network.per_second` | number | Turns the bucket refills a second: the steady rate. |
| `limits.network.burst` | integer | Turns the bucket holds: how many requests may go at once after a quiet spell. At least -9007199254740991. |
| `limits.network.custom` | boolean | True when Claim House set this organization's own limit; false for the standard 5 a second (bursts of up to 50). |
| `limits.office` | object | Per office: Eligibility checks of one office, on top of the three above. |
| `limits.office.per_second` | number | Turns the bucket refills a second: the steady rate. |
| `limits.office.burst` | integer | Turns the bucket holds: how many requests may go at once after a quiet spell. At least -9007199254740991. |
| `limits.office.custom` | boolean | True when Claim House set this organization's own limit; false for the standard 5 a second (bursts of up to 50). |

## Errors

| HTTP status | Code | What it means |
| --- | --- | --- |
| 401 | `UNAUTHORIZED` | A valid API key is required. Send it as "Authorization: Bearer <key>". |
| 403 | `PERMISSION_DENIED` | This API key is not allowed to do that. |
| 422 | `INVALID_REQUEST` | The request is not valid. |
| 429 | `TOO_MANY_REQUESTS` | Too many requests of this kind lately. Wait, then try again. |
| 504 | `TIMEOUT` | The request took too long. Send it again with the same Idempotency-Key and body after Retry-After seconds: a 409 means it is still finishing (wait and send again), and any other answer is final. If this 504 comes back, find what the request made by listing with ?idempotency_key=<the key>. |
| 500 | `INTERNAL` | Something went wrong on our side. Quote the request ID if you contact us. |

## Example

### Example request

```bash
curl "https://sandbox.myclaimhouse.com/api/v1/rate_limits" \
  -H "Authorization: Bearer $CLAIMHOUSE_KEY"
```

### Example response: 200

```json
{
  "object": "rate_limits",
  "mode": "test",
  "limits": {
    "key": {
      "per_second": 20,
      "burst": 40,
      "custom": false
    },
    "organization": {
      "per_second": 50,
      "burst": 100,
      "custom": false
    },
    "network": {
      "per_second": 5,
      "burst": 50,
      "custom": false
    },
    "office": {
      "per_second": 5,
      "burst": 50,
      "custom": false
    }
  }
}
```
