Skip to content

Reference

Supabase Project APIs

Query a Supabase project through Alter Vault without exposing its API key

Use a Supabase project API key to call the project’s Data, Auth, Storage, Edge Functions, Realtime, and GraphQL APIs through Alter Vault. Alter’s backend sends the key in Supabase’s required apikey header; application and SDK processes do not receive it on the proxy path.

PropertyValue
Provider IDsupabase
CategoryDeveloper Tools
Credential TypeAPI Key Header (apikey)

Log in and select your project

Open the Supabase Dashboard and select the project Alter should access.

Open API Keys

Copy a project API key

Copy an sb_publishable_... or sb_secret_... key. Hosted keys use Supabase’s 22-character random value + underscore + 8-character checksum format. Supabase also accepts legacy anon and service_role JWT keys in the apikey header.

Copy the Project URL

Copy the Project URL, such as https://your-project.supabase.co, or the HTTPS custom domain configured for that project. Alter also accepts the bare hostname.

Choose Managed SecretsAdd Managed SecretSupabase Project APIs, then enter the project API key and Project URL. Alter binds the credential to that exact project hostname and validates it through the project’s API-key gateway using the public Auth settings endpoint. This works for publishable/anon as well as secret/service-role keys; Supabase’s /rest/v1/ OpenAPI root no longer accepts public keys even though ordinary table routes do. A definitive Supabase rejection fails the save; an inconclusive response is reported without misclassifying a valid restricted key. The generic allowed-hosts editor cannot widen or clear this binding.

To move the secret to another project, rotate it with the new API key and project_url. Leaving Project URL blank during rotation preserves the current binding.

Every rotation reapplies the built-in Supabase Project APIs contract (apikey plus the exact project host); stored injection metadata is not treated as operator-editable configuration. If Alter cannot read the existing project binding, rotation fails before writing a new credential and asks for project_url explicitly.

Older Alter installations stored both Supabase surfaces under supabase. A historical row is visibly marked for repair until Alter can classify its Vault credential without changing its destination. If the row already has the matching project host, first use repairs it atomically. Otherwise, edit the secret and rotate with a project key plus Project URL. To deliberately convert an eligible historical row to account-level Management access, rotate with an sbp_ personal access token and complete the explicit type-to-confirm step; Alter removes the project binding and repoints every existing grant to api.supabase.com. Current Project API secrets cannot be converted in place.

response = await alter_app.request(
HttpMethod.GET,
"https://your-project.supabase.co/rest/v1/your_table?select=*",
grant_id="YOUR_GRANT_ID",
)

The SDK sends the unsigned request metadata to Alter. After policy, exact-host, and normalized project-path checks pass, Alter’s backend injects apikey: YOUR_PROJECT_KEY and executes the provider request. The allowed project surfaces are /rest/v1, /auth/v1, /storage/v1, /functions/v1, /realtime/v1, and /graphql/v1; every other path and every other host is rejected before credential injection. Do not put the project key or an Authorization header in application request headers.

Operation IDFamiliesMethodProvider path
describe_data_apireadGET/rest/v1
read_table_rowsadmin, delete, payment, read, send, writeGET/rest/v1/{table}
inspect_table_rowsadmin, delete, payment, read, send, writeHEAD/rest/v1/{table}
create_table_rowsadmin, delete, payment, read, send, writePOST/rest/v1/{table}
replace_table_rowsadmin, delete, payment, read, send, writePUT/rest/v1/{table}
update_table_rowsadmin, delete, payment, read, send, writePATCH/rest/v1/{table}
delete_table_rowsadmin, delete, payment, read, send, writeDELETE/rest/v1/{table}
read_database_functionadmin, delete, payment, read, send, writeGET/rest/v1/rpc/{function}
call_database_functionadmin, delete, payment, read, send, writePOST/rest/v1/rpc/{function}
project_auth_*admin, delete, payment, read, send, writesupported HTTP methods/auth/v1[/…]
project_storage_*admin, delete, payment, read, send, writesupported HTTP methods/storage/v1[/…]
project_functions_*admin, delete, payment, read, send, writesupported HTTP methods/functions/v1[/…]
project_realtime_*admin, delete, payment, read, send, writesupported HTTP methods/realtime/v1[/…]
project_graphql_*admin, delete, payment, read, send, writesupported HTTP methods/graphql/v1[/…]

Project-defined tables, views, functions, triggers, webhooks, Auth hooks, Storage policies, and GraphQL resolvers can have arbitrary side effects. Until a project-specific attestation exists, every project-defined operation deliberately carries the complete policy-family union. This conservative posture means a family deny for send, payment, or admin cannot be bypassed by hiding that action behind an apparently ordinary read or write.

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.