Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/pages/public-api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Certain API endpoints that allow manipulation of encrypted data such as Secrets

## Rate Limits

The Phase Cloud API enforces rate limiting to ensure fair usage and maintain optimal performance for all users. The following standard rate limits apply, based on your Organisation's plan:
The Phase Cloud API applies rate limits. These limits keep usage fair and performance stable for all users. The limit depends on the plan of your Organisation:

| Plan | Requests per Minute |
|------|---------------------|
Expand All @@ -82,10 +82,10 @@ The Phase Cloud API enforces rate limiting to ensure fair usage and maintain opt
| Enterprise | Custom |

<Note>
The rate limits are enforced per account (User or Service Account) across an organisation.
The rate limit applies to your Organisation as a whole. All Users, Service Accounts, and Service Tokens in an Organisation share one limit.
</Note>

If you exceed the allowed number of requests within a given time frame, you will receive a `429 Too Many Requests` response. The response will include information about when you can retry your request in the `retry-after` header.
If your Organisation sends more requests than the limit permits, the API returns a `429 Too Many Requests` response. The `retry-after` header in the response gives the number of seconds until the limit resets.

```bash
HTTP/2 429
Expand All @@ -102,4 +102,4 @@ referrer-policy: same-origin
cross-origin-opener-policy: same-origin
```

Self-hosted Phase instances do not enforce rate limiting by default. However, administrators can configure rate limiting based on their requirements via the `RATE_LIMIT_DEFAULT` environment variable. Please see the self-hosting [deployment configuration documentation](/self-hosting/configuration/envars#additional-environment-variables) for more details.
Self-hosted Phase instances do not apply rate limits by default. Administrators can set a rate limit with the `RATE_LIMIT_DEFAULT` environment variable. If this variable is not set, the API applies no rate limits. See the self-hosting [deployment configuration documentation](/self-hosting/configuration/envars#additional-environment-variables) for more information.
4 changes: 2 additions & 2 deletions src/pages/self-hosting/configuration/envars.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1094,8 +1094,8 @@ These variables are not required if using the suggested [docker-compose template
Referenced by the [`worker`](https://hub.docker.com/r/phasehq/backend) container.
</Property>
<Property name="RATE_LIMIT_DEFAULT" type="string">
Rate limit for API requests.
Example: `100/minute`. Rate limits can be specified over a period of second, minute, hour or day. The period must be specified after the / separator using s, m, h or d, respectively. For increased clarity, extended units such as second, minute, hour, day or even abbreviations like sec, min, hr are allowed, as only the first character is relevant to identify the rate.
The rate limit for API requests. All Users, Service Accounts, and Service Tokens in an Organisation share one limit. If this variable is not set, the API applies no rate limits.
Example: `100/minute`. Set the period after the `/` separator with `s`, `m`, `h` or `d` for second, minute, hour or day. You can also use full units such as `second`, `minute`, `hour` or short forms such as `sec`, `min`, `hr`. Only the first character of the period is used.
Referenced by the [`backend`](https://hub.docker.com/r/phasehq/backend) and [`worker`](https://hub.docker.com/r/phasehq/backend) containers.
</Property>
</Properties>