## Problem
The Management API rate limits section explains the limit, its scope,
and its headers, but not which traffic it applies to. Readers can't tell
whether CLI commands or calls to their own project, such as Edge
Function invocations, count toward it.
Related to
[FDBKIN-22153](https://linear.app/supabase/issue/FDBKIN-22153/clarify-documentation-for-management-api-rate-limits-and-what-actions)
Closes
[DOCS-1764](https://linear.app/supabase/issue/DOCS-1764/say-which-requests-count-toward-the-management-api-rate-limit)
## Solution
The "Rate limits" section of the Management API introduction now opens
by saying that only requests to `https://api.supabase.com` count, and
that requests to a project's own URL don't. The "Rate limit scope"
subsection ends with a CLI example: `supabase functions deploy` sends at
least one Management API request per function, so a large deploy to one
project might reach the per-endpoint limit. The example sits after the
scope rules so it reads as an application of them. The limits, tables,
scope rules, and headers are unchanged.
## How to verify
1. Open `/docs/reference/api/introduction` in the preview and go to
"Rate limits".
2. The intro says only requests to `https://api.supabase.com` count, and
that requests to `https://<project-ref>.supabase.co`, such as Edge
Function invocations and Data API calls, don't.
3. The end of "Rate limit scope" says the Supabase CLI uses the
Management API, and that `supabase functions deploy` to one project with
many functions might reach the per-endpoint limit.
4. The limit tables, scope list, and response headers match production.
## Checks
Ran `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm
turbo run lint --filter='[origin/master]'` (no errors), and `pnpm exec
oxfmt --check` on the changed file. Checked the CLI claim against
`supabase/cli` `apps/cli/src/shared/functions/deploy.ts`. By default it
bundles with Docker and calls `POST /v1/projects/{ref}/functions` or
`PATCH /v1/projects/{ref}/functions/{slug}` per function, then one bulk
`PUT /v1/projects/{ref}/functions`. With `--use-api`, or when Docker
isn't running, it calls `POST /v1/projects/{ref}/functions/deploy` per
function. Because of that, the text doesn't name a single endpoint. The
Edge Function invocation URL comes from the Edge Functions quickstart.
## Checklist
- [x] I have read the [Contributing
Guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] I have checked that the change works in the preview deployment
## Feedback for Tedd
To ask Tedd for a change to this PR, reply in Tedd's session on
[DOCS-1764](https://linear.app/supabase/issue/DOCS-1764/say-which-requests-count-toward-the-management-api-rate-limit).
Tedd doesn't read comments on this PR.
---------
Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
## Problem
The Management API rate limits docs said limits are per user and per
project or organization. They didn't say that each endpoint also has its
own limit, or how requests without a project or organization, and tokens
versus OAuth apps, are counted. The partial also had a typo, a repeated
example, and a tracking-key sentence that listed endpoint as a scope.
## Solution
Edits to `apps/docs/content/_partials/api_rate_limits.mdx`, in one
commit per change type:
1. `docs(mgmt-api): clarify rate limits are per endpoint`: the content
change. It adds the per-endpoint model, the user scope, the `POST
/v1/projects` scoping, and who the limit applies to.
2. **Style**: fixes the `enpoint` typo and the table alignment, removes
the repeated Project A/B paragraph and the `database/context` note that
restated its table rows, unwraps hard-wrapped lines, and aligns bold
labels and wording with the style guide.
3. **Structure**: moves "Rate limit response headers" after "Who the
limit applies to", so the concept sections come before the reference
sections. No headings were renamed, and no inbound anchors to them exist
in `apps` or `packages`.
4. **Technical**: the tracking-key sentence now reads "scope (project or
organization) and the endpoint". It previously listed endpoint as a
scope, which contradicted the scope list.
Not verified against the rate limiter, which isn't in this repo. A
reviewer with access should confirm:
- Requests without a project or organization count against the user.
- `POST /v1/projects` is organization-scoped via `organization_slug`.
- Personal access tokens share the user's limit, and OAuth apps share
the app's limit.
- The tracking-key wording in commit 4 is inferred from the page, not
from code.
## Preview links
| Site | Live | Preview | Search for |
| ---- |
-------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------
| ------------------------------ |
| Docs |
[/docs/reference/api/introduction](https://supabase.com/docs/reference/api/introduction)
|
[/docs/reference/api/introduction](https://docs-git-docs-mgmt-api-rate-limits-per-endpoint-supabase.vercel.app/docs/reference/api/introduction)
| `Who the limit applies to` |
## Review instructions
1. Open the live and preview links side by side and scroll to "Rate
limits".
2. Check that the section order is: Standard rate limit, Rate limit
scope, How rate limits are tracked, Who the limit applies to, Rate limit
response headers, Endpoint exceptions, Best practices.
3. Check that the scope table and the endpoint exceptions tables render
correctly.
4. Review commit by commit, since each commit is one change type.
5. If you can read the rate limiter code, check the unverified claims
listed above.
## Checklist
Check all before review:
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>