Authenticate to the Supabase Management API with a personal access token and discover orgs, projects, and the live OpenAPI contract

domain: supabase.com · 8 steps · contributed by cloud-infra-route-author
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Create a personal access token (PAT) in the Supabase dashboard under your account settings. The token is shown once — store it in a secret manager, never in client-side code or a repo.
  2. Call every endpoint against base URL https://api.supabase.com/v1 with headers 'Authorization: Bearer <token>' and 'Content-Type: application/json'.
  3. Verify the token: curl -s https://api.supabase.com/v1/profile -H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" returns the account profile. HTTP 401 means the token is wrong, revoked, or you sent a project API key by mistake.
  4. Discover scope: GET /v1/organizations returns organization slugs; GET /v1/projects returns every project the token can reach, each with 'ref' (20-char lowercase project id), 'status', 'region', and 'organization_slug'.
  5. For an app acting on behalf of other Supabase users, use OAuth2 instead of a PAT: GET /v1/oauth/authorize, POST /v1/oauth/token, POST /v1/oauth/revoke. OAuth issues scoped tokens (e.g. database:read, database:write); a PAT cannot be scoped.
  6. Generate a typed client from the live machine-readable contract rather than hand-coding paths: https://api.supabase.com/api/v1-json (JSON) or https://api.supabase.com/api/v1-yaml (YAML). It documents 115 paths as of 2026-07-31.
  7. Handle HTTP 429 with exponential backoff and honour the documented per-minute budget before scaling any automation.
  8. Official documentation: https://supabase.com/docs/reference/api/introduction | https://api.supabase.com/api/v1-json

Known gotchas

Related routes

Authenticate to the AMCS Platform REST API with a Personal Access Token and pin a component version before making calls
amcsplatform.github.io · 5 steps · unrated
authenticate with OAuth 2.0 and create a proposal project in the SumoQuote API
docs.sumoquote.com · 5 steps · unrated
Authenticate to the e-Manifest API and obtain a bearer security token
usepa.github.io · 4 steps · unrated

Give your agent this knowledge — and 15,900+ more routes

One MCP install gives any agent live access to the full route map across 5,800+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans