# Management API Reference Management API Manage your Supabase organizations and projects programmatically. ## Authentication All API requests require an access token to be included in the Authorization header: `Authorization Bearer `. There are two ways to generate an access token: 1. **Personal access token (PAT):** PATs are tokens with a custom expiry that you manually generate to access the Management API. They are useful for automating workflows or developing against the Management API. A scoped PAT can only reach the organizations, projects, and permissions you choose when creating it. A classic PAT, shown as Legacy in the dashboard, carries the same privileges as your user account. Prefer scoped PATs, and keep every token secret. To generate or manage your personal access tokens, visit your [account](https://supabase.com/dashboard/account/tokens) page. See [Personal access tokens](https://supabase.com/docs/guides/platform/personal-access-tokens) for the permission each endpoint requires. 2. **OAuth2:** OAuth2 allows your application to generate tokens on behalf of a Supabase user, providing secure and limited access to their account without requiring their credentials. Use this if you're building a third-party app that needs to create or manage Supabase projects on behalf of your users. Tokens generated via OAuth2 are short-lived and tied to specific scopes to ensure your app can only perform actions that are explicitly approved by the user. See [Build a Supabase Integration](https://supabase.com/docs/guides/integrations/build-a-supabase-integration) to set up OAuth2 for your application. ```bash curl https://api.supabase.com/v1/projects \ -H "Authorization: Bearer sbp_bdd0••••••••••••••••••••••••••••••••4f23" ``` All API requests must be authenticated and made over HTTPS. The Management API is subject to our fair-use policy. All resources created via the API are subject to the pricing detailed on our [Pricing](https://supabase.com/pricing) pages. ## Additional links - [OpenAPI Docs](https://api.supabase.com/api/v1) - [OpenAPI Spec](https://api.supabase.com/api/v1-json) - [Report bugs and issues](https://github.com/supabase/supabase) ## Advisors ## Gets project performance advisors. `GET /v1/projects/{ref}/advisors/performance` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. ### Parameters - `ref` (string, required): Project ref ## Gets project security advisors. `GET /v1/projects/{ref}/advisors/security` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. ### Parameters - `ref` (string, required): Project ref - `lint_type` (string, optional) ## Runs the project advisors with the given names `POST /v2/projects/{ref}/advisors/run` ### Parameters - `ref` (string, required): Project ref ## Analytics ## Create a log drain for a project `POST /v2/projects/{ref}/analytics/log-drains` ### Parameters - `ref` (string, required): Project ref ## Delete a project log drain `DELETE /v2/projects/{ref}/analytics/log-drains/{id}` ### Parameters - `ref` (string, required): Project ref - `id` (string, required): Log drains identifier ## Gets a project's function combined statistics `GET /v1/projects/{ref}/analytics/endpoints/functions.combined-stats` ### Parameters - `ref` (string, required): Project ref - `interval` (string, required) - `function_id` (string, required) ## Gets all project's logs in a single log stream `GET /v1/projects/{ref}/analytics/endpoints/logs` Executes an SQL or LQL query on the project's unified logs stream. Either the `iso_timestamp_start` and `iso_timestamp_end` parameters must be provided. If both are not provided, only the last 1 minute of logs will be queried. The timestamp range must be no more than 24 hours and is rounded to the nearest minute. If the range is more than 24 hours, a validation error will be thrown. Filter by the `source` column to specify specific log sources, such as edge\_logs, postgres\_logs, etc. Note: SQL must be written in **ClickHouse SQL dialect**. ### Parameters - `ref` (string, required): Project ref - `sql` (string, optional): Custom SQL query to execute on the logs. See [querying logs](https://supabase.com/docs/guides/monitoring-and-debugging/logs#querying-with-the-logs-explorer) for more details. - `iso_timestamp_start` (string, optional) - `iso_timestamp_end` (string, optional) ## Gets project's logs `GET /v1/projects/{ref}/analytics/endpoints/logs.all` This endpoint has been removed and always responds with `410 Gone`. Use `GET /v1/projects/{ref}/analytics/endpoints/logs` instead. See the [migration guide](https://supabase.com/changelog/48235-migration-of-supabase-management-api-logs-all-analytics-endpoint-to-logs-endpoint). ### Parameters - `ref` (string, required): Project ref ## Gets project's usage api counts `GET /v1/projects/{ref}/analytics/endpoints/usage.api-counts` ### Parameters - `ref` (string, required): Project ref - `interval` (string, optional) ## Gets project's usage api requests count `GET /v1/projects/{ref}/analytics/endpoints/usage.api-requests-count` ### Parameters - `ref` (string, required): Project ref ## List project log drains `GET /v2/projects/{ref}/analytics/log-drains` ### Parameters - `ref` (string, required): Project ref ## Scrape a project's metrics `GET /v1/projects/{ref}/analytics/endpoints/metrics` Prometheus scrape endpoint. Returns metrics of a customer project in the Prometheus open exposition format. ### Parameters - `ref` (string, required): Project ref ## Update a project log drain `PUT /v2/projects/{ref}/analytics/log-drains/{id}` ### Parameters - `ref` (string, required): Project ref - `id` (string, required): Log drains identifier ## Auth ## Creates a new SSO provider `POST /v1/projects/{ref}/config/auth/sso/providers` ### Parameters - `ref` (string, required): Project ref ## Set up the project's existing JWT secret as an in\_use JWT signing key. This endpoint will be removed in the future always check for HTTP 404 Not Found. `POST /v1/projects/{ref}/config/auth/signing-keys/legacy` ### Parameters - `ref` (string, required): Project ref ## Create a new signing key for the project in standby status `POST /v1/projects/{ref}/config/auth/signing-keys` ### Parameters - `ref` (string, required): Project ref ## Creates a new third-party auth integration `POST /v1/projects/{ref}/config/auth/third-party-auth` ### Parameters - `ref` (string, required): Project ref ## Removes a SSO provider by its UUID `DELETE /v1/projects/{ref}/config/auth/sso/providers/{provider_id}` ### Parameters - `ref` (string, required): Project ref - `provider_id` (string, required) ## Removes a third-party auth integration `DELETE /v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}` ### Parameters - `ref` (string, required): Project ref - `tpa_id` (string, required) ## Gets a SSO provider by its UUID `GET /v1/projects/{ref}/config/auth/sso/providers/{provider_id}` ### Parameters - `ref` (string, required): Project ref - `provider_id` (string, required) ## Gets project's auth config `GET /v1/projects/{ref}/config/auth` ### Parameters - `ref` (string, required): Project ref ## Get the signing key information for the JWT secret imported as signing key for this project. This endpoint will be removed in the future, check for HTTP 404 Not Found. `GET /v1/projects/{ref}/config/auth/signing-keys/legacy` ### Parameters - `ref` (string, required): Project ref ## Get information about a signing key `GET /v1/projects/{ref}/config/auth/signing-keys/{id}` ### Parameters - `id` (string, required) - `ref` (string, required): Project ref ## List all signing keys for the project `GET /v1/projects/{ref}/config/auth/signing-keys` ### Parameters - `ref` (string, required): Project ref ## Get a third-party integration `GET /v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}` ### Parameters - `ref` (string, required): Project ref - `tpa_id` (string, required) ## Lists all SSO providers `GET /v1/projects/{ref}/config/auth/sso/providers` ### Parameters - `ref` (string, required): Project ref ## Lists all third-party auth integrations `GET /v1/projects/{ref}/config/auth/third-party-auth` ### Parameters - `ref` (string, required): Project ref ## Remove a signing key from a project. Only possible if the key has been in revoked status for a while. `DELETE /v1/projects/{ref}/config/auth/signing-keys/{id}` ### Parameters - `id` (string, required) - `ref` (string, required): Project ref ## Updates a SSO provider by its UUID `PUT /v1/projects/{ref}/config/auth/sso/providers/{provider_id}` ### Parameters - `ref` (string, required): Project ref - `provider_id` (string, required) ## Updates a project's auth config `PATCH /v1/projects/{ref}/config/auth` ### Parameters - `ref` (string, required): Project ref ## Update a signing key, mainly its status `PATCH /v1/projects/{ref}/config/auth/signing-keys/{id}` ### Parameters - `id` (string, required) - `ref` (string, required): Project ref ## Billing ## Apply or update billing addons, including compute instance size `PATCH /v1/projects/{ref}/billing/addons` Selects an addon variant, for example scaling the project’s compute instance up or down, and applies it to the project. ### Parameters - `ref` (string, required): Project ref ## List billing addons and compute instance selections `GET /v1/projects/{ref}/billing/addons` Returns the billing addons that are currently applied, including the active compute instance size, and lists every addon option that can be provisioned with pricing metadata. ### Parameters - `ref` (string, required): Project ref ## Remove billing addons or revert compute instance sizing `DELETE /v1/projects/{ref}/billing/addons/{addon_variant}` Disables the selected addon variant, including rolling the compute instance back to its previous size. ### Parameters - `ref` (string, required): Project ref - `addon_variant` (string, required) ## Compute ## Mint a presigned slot for a build-context upload `POST /v2/projects/{ref}/compute/{name}/uploads` PUT the `.tar.gz` build context to the returned `url` before `expires_at`, then deploy with the upload id as `context_upload_id`. The bytes go straight to storage — no management API request carries them. This endpoint is currently in its **Alpha** stage. ### Parameters - `ref` (string, required): Project ref - `name` (string, required) ## Delete a compute instance `DELETE /v2/projects/{ref}/compute/{name}` Tombstones the compute instance. Its running instances and image are torn down asynchronously. This endpoint is currently in its **Alpha** stage. ### Parameters - `ref` (string, required): Project ref - `name` (string, required) ## Deploy a compute instance `POST /v2/projects/{ref}/compute/{name}/deploy` Creates the compute instance if it does not exist, building from a context staged through the uploads endpoint. The build runs asynchronously: this answers 202 and the compute instance reaches `build_state` `active` or `failed` later. This endpoint is currently in its **Alpha** stage. ### Parameters - `ref` (string, required): Project ref - `name` (string, required) ## Retrieve a compute instance `GET /v2/projects/{ref}/compute/{name}` Returns a compute instance along with the counts of its running instances. Poll this after a deploy until `build_state` leaves `building`. This endpoint is currently in its **Alpha** stage. ### Parameters - `ref` (string, required): Project ref - `name` (string, required) ## List all compute instances `GET /v2/projects/{ref}/compute` Returns all compute instances you've previously deployed to the specified project. This endpoint is currently in its **Alpha** stage. ### Parameters - `ref` (string, required): Project ref ## Database ## Accepts invitation for JIT database access `POST /v1/projects/{ref}/database/jit/invite/accept` Accepts the invitation to JIT database access ### Parameters - `ref` (string, required): Project ref ## Apply a database migration `POST /v1/projects/{ref}/database/migrations` ### Parameters - `ref` (string, required): Project ref - `Idempotency-Key` (string, optional): A unique key to ensure the same migration is tracked only once. ## Authorize user-id to role mappings for JIT access `POST /v1/projects/{ref}/database/jit` Authorizes the request to assume a role in the project database ### Parameters - `ref` (string, required): Project ref ## Create a login role for CLI with temporary password `POST /v1/projects/{ref}/cli/login-role` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Deletes the invite for an external user to a database for JIT access `DELETE /v1/projects/{ref}/database/jit/invite/{invite_id}` Revokes and deletes the invitation ### Parameters - `ref` (string, required): Project ref - `invite_id` (string, required) ## Delete JIT access by user-id `DELETE /v1/projects/{ref}/database/jit/{user_id}` Remove JIT mappings of a user, revoking all JIT database access ### Parameters - `ref` (string, required): Project ref - `user_id` (string, required) ## Delete existing login roles used by CLI `DELETE /v1/projects/{ref}/cli/login-role` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Disables project's readonly mode for the next 15 minutes `POST /v1/projects/{ref}/readonly/temporary-disable` ### Parameters - `ref` (string, required): Project ref ## Enables Database Webhooks on the project `POST /v1/projects/{ref}/database/webhooks/enable` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Generate TypeScript types `GET /v1/projects/{ref}/types/typescript` Returns the TypeScript types of your schema for use with supabase-js. ### Parameters - `included_schemas` (string, optional) - `ref` (string, required): Project ref ## Fetch an existing entry from migration history `GET /v1/projects/{ref}/database/migrations/{version}` ### Parameters - `ref` (string, required): Project ref - `version` (string, required) ## Gets a specific SQL snippet `GET /v1/snippets/{id}` ### Parameters - `id` (string, required) ## Gets the backup schedule for a project `GET /v1/projects/{ref}/database/backups/schedule` ### Parameters - `ref` (string, required): Project ref ## Gets database metadata for the given project. `GET /v1/projects/{ref}/database/context` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. ### Parameters - `ref` (string, required): Project ref ## Get PostgREST OpenAPI spec `GET /v1/projects/{ref}/database/openapi` Returns the PostgREST OpenAPI specification for the project. This is the replacement for querying `/rest/v1/` directly with the anon key. ### Parameters - `ref` (string, required): Project ref - `schema` (string, optional): The database schema to generate the OpenAPI spec for ## Get user-id to role mappings for JIT access `GET /v1/projects/{ref}/database/jit` Mappings of roles a user can assume in the project database ### Parameters - `ref` (string, required): Project ref ## Get project's temporary access configuration. `GET /v1/projects/{ref}/jit-access` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Gets project's supavisor config `GET /v1/projects/{ref}/config/database/pooler` ### Parameters - `ref` (string, required): Project ref ## Gets project's Postgres config `GET /v1/projects/{ref}/config/database/postgres` ### Parameters - `ref` (string, required): Project ref ## Get project's pgbouncer config `GET /v1/projects/{ref}/config/database/pgbouncer` ### Parameters - `ref` (string, required): Project ref ## Returns project's readonly mode status `GET /v1/projects/{ref}/readonly` ### Parameters - `ref` (string, required): Project ref ## Get project's SSL enforcement configuration. `GET /v1/projects/{ref}/ssl-enforcement` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Invites an external user to a database for JIT access `POST /v1/projects/{ref}/database/jit/invite` Invites the external user and sets initial roles that can be assumed and for how long ### Parameters - `ref` (string, required): Project ref ## Lists all backups `GET /v1/projects/{ref}/database/backups` ### Parameters - `ref` (string, required): Project ref ## Lists SQL snippets for the logged in user `GET /v1/snippets` ### Parameters - `project_ref` (string, optional): Project ref - `cursor` (string, optional) - `limit` (string, optional) - `sort_by` (string, optional) - `sort_order` (string, optional) ## List all user-id to role mappings for JIT access `GET /v1/projects/{ref}/database/jit/list` Mappings of roles a user can assume in the project database ### Parameters - `ref` (string, required): Project ref ## List applied migration versions `GET /v1/projects/{ref}/database/migrations` ### Parameters - `ref` (string, required): Project ref ## Patch an existing entry in migration history `PATCH /v1/projects/{ref}/database/migrations/{version}` ### Parameters - `ref` (string, required): Project ref - `version` (string, required) ## Run a sql query as supabase\_read\_only\_user `POST /v1/projects/{ref}/database/query/read-only` All entity references must be schema qualified. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Remove a read replica `POST /v1/projects/{ref}/read-replicas/remove` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Restores a PITR backup for a database `POST /v1/projects/{ref}/database/backups/restore-pitr` ### Parameters - `ref` (string, required): Project ref ## Rollback database migrations and remove them from history table `DELETE /v1/projects/{ref}/database/migrations` ### Parameters - `ref` (string, required): Project ref - `gte` (string, required): Rollback migrations greater or equal to this version ## Run sql query `POST /v1/projects/{ref}/database/query` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Set up a read replica `POST /v1/projects/{ref}/read-replicas/setup` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Updates the backup schedule time for a project `PATCH /v1/projects/{ref}/database/backups/schedule` Sets the time at which the daily backup runs. The change takes effect on the next backup window that includes the new time. If the new time has already passed for today, the first backup at the new time will occur the following day. It can only be updated 3 times per 24 hours. ### Parameters - `ref` (string, required): Project ref ## Updates the database password `PATCH /v1/projects/{ref}/database/password` ### Parameters - `ref` (string, required): Project ref ## Updates a user mapping for JIT access `PUT /v1/projects/{ref}/database/jit` Modifies the roles that can be assumed and for how long ### Parameters - `ref` (string, required): Project ref ## Update project's temporary access configuration. `PUT /v1/projects/{ref}/jit-access` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Updates project's supavisor config `PATCH /v1/projects/{ref}/config/database/pooler` ### Parameters - `ref` (string, required): Project ref ## Updates project's Postgres config `PUT /v1/projects/{ref}/config/database/postgres` ### Parameters - `ref` (string, required): Project ref ## Update project's SSL enforcement configuration. `PUT /v1/projects/{ref}/ssl-enforcement` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Upsert a database migration without applying `PUT /v1/projects/{ref}/database/migrations` ### Parameters - `ref` (string, required): Project ref - `Idempotency-Key` (string, optional): A unique key to ensure the same migration is tracked only once. ## Domains ## Activates a custom hostname for a project. `POST /v1/projects/{ref}/custom-hostname/activate` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Activates a vanity subdomain for a project. `POST /v1/projects/{ref}/vanity-subdomain/activate` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Checks vanity subdomain availability `POST /v1/projects/{ref}/vanity-subdomain/check-availability` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Deletes a project's vanity subdomain configuration `DELETE /v1/projects/{ref}/vanity-subdomain` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Gets project's custom hostname config `GET /v1/projects/{ref}/custom-hostname` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Gets current vanity subdomain config `GET /v1/projects/{ref}/vanity-subdomain` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Updates project's custom hostname configuration `POST /v1/projects/{ref}/custom-hostname/initialize` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Attempts to verify the DNS configuration for project's custom hostname configuration `POST /v1/projects/{ref}/custom-hostname/reverify` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Edge Functions ## Bulk update functions `PUT /v1/projects/{ref}/functions` Bulk update functions. It will create a new function or replace existing. The operation is idempotent. NOTE: You will need to manually bump the version. ### Parameters - `ref` (string, required): Project ref ## Create a function `POST /v1/projects/{ref}/functions` This endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project. ### Parameters - `ref` (string, required): Project ref - `slug` (string, optional) - `name` (string, optional) - `verify_jwt` (string, optional) - `import_map` (string, optional) - `entrypoint_path` (string, optional) - `import_map_path` (string, optional) - `ezbr_sha256` (string, optional) ## Delete a function `DELETE /v1/projects/{ref}/functions/{function_slug}` Deletes a function with the specified slug from the specified project. ### Parameters - `ref` (string, required): Project ref - `function_slug` (string, required): Function slug ## Deploy a function `POST /v1/projects/{ref}/functions/deploy` A new endpoint to deploy functions. It will create if function does not exist. ### Parameters - `ref` (string, required): Project ref - `slug` (string, optional) - `bundleOnly` (string, optional) ## Retrieve a function `GET /v1/projects/{ref}/functions/{function_slug}` Retrieves a function with the specified slug and project. ### Parameters - `ref` (string, required): Project ref - `function_slug` (string, required): Function slug ## Retrieve a function body `GET /v1/projects/{ref}/functions/{function_slug}/body` Retrieves a function body for the specified slug and project. ### Parameters - `ref` (string, required): Project ref - `function_slug` (string, required): Function slug ## List all functions `GET /v1/projects/{ref}/functions` Returns all functions you've previously added to the specified project. ### Parameters - `ref` (string, required): Project ref ## Update a function `PATCH /v1/projects/{ref}/functions/{function_slug}` Updates a function with the specified slug and project. ### Parameters - `ref` (string, required): Project ref - `function_slug` (string, required): Function slug - `slug` (string, optional) - `name` (string, optional) - `verify_jwt` (string, optional) - `import_map` (string, optional) - `entrypoint_path` (string, optional) - `import_map_path` (string, optional) - `ezbr_sha256` (string, optional) ## Environments ## Count the number of action runs `HEAD /v1/projects/{ref}/actions` Returns the total number of action runs of the specified project. ### Parameters - `ref` (string, required): Project ref ## Create a database branch `POST /v1/projects/{ref}/branches` Creates a database branch from the specified project. ### Parameters - `ref` (string, required): Project ref ## Create a database branch `POST /v2/projects/{ref}/branches` Creates a database branch from the specified project. Compute and disk size can be set here so the branch is provisioned at the requested size, instead of being resized after creation. ### Parameters - `ref` (string, required): Project ref ## Delete a database branch `DELETE /v1/branches/{branch_id_or_ref}` Deletes the specified database branch. By default, deletes immediately. Use force=false to schedule deletion with 1-hour grace period (only when soft deletion is enabled). ### Parameters - `branch_id_or_ref` (string, required): Branch ref or deprecated branch ID - `force` (string, optional): If set to false, schedule deletion with 1-hour grace period (only when soft deletion is enabled). ## Diffs a database branch `GET /v1/branches/{branch_id_or_ref}/diff` Diffs the specified database branch This endpoint is currently in its **Beta** stage. ### Parameters - `branch_id_or_ref` (string, required): Branch ref or deprecated branch ID - `included_schemas` (string, optional) - `pgdelta` (string, optional): Use pg-delta instead of Migra for diffing when true. Boolean string. Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` ## Disables preview branching `DELETE /v1/projects/{ref}/branches` Disables preview branching for the specified project ### Parameters - `ref` (string, required): Project ref ## Get a database branch `GET /v1/projects/{ref}/branches/{name}` Fetches the specified database branch by its name. ### Parameters - `ref` (string, required): Project ref - `name` (string, required) ## Get database branch config `GET /v1/branches/{branch_id_or_ref}` Fetches configurations of the specified database branch ### Parameters - `branch_id_or_ref` (string, required): Branch ref or deprecated branch ID ## Get the status of an action run `GET /v1/projects/{ref}/actions/{run_id}` Returns the current status of the specified action run. ### Parameters - `ref` (string, required): Project ref - `run_id` (string, required): Action Run ID ## Get the logs of an action run `GET /v1/projects/{ref}/actions/{run_id}/logs` Returns the logs from the specified action run. ### Parameters - `ref` (string, required): Project ref - `run_id` (string, required): Action Run ID ## List all action runs `GET /v1/projects/{ref}/actions` Returns a paginated list of action runs of the specified project. ### Parameters - `ref` (string, required): Project ref - `offset` (number, optional) - `limit` (number, optional) ## List all database branches `GET /v1/projects/{ref}/branches` Returns all database branches of the specified project. ### Parameters - `ref` (string, required): Project ref ## Merges a database branch `POST /v1/branches/{branch_id_or_ref}/merge` Merges the specified database branch ### Parameters - `branch_id_or_ref` (string, required): Branch ref or deprecated branch ID ## Pushes a database branch `POST /v1/branches/{branch_id_or_ref}/push` Pushes the specified database branch ### Parameters - `branch_id_or_ref` (string, required): Branch ref or deprecated branch ID ## Resets a database branch `POST /v1/branches/{branch_id_or_ref}/reset` Resets the specified database branch ### Parameters - `branch_id_or_ref` (string, required): Branch ref or deprecated branch ID ## Restore a scheduled branch deletion `POST /v1/branches/{branch_id_or_ref}/restore` Cancels scheduled deletion and restores the branch to active state ### Parameters - `branch_id_or_ref` (string, required): Branch ref or deprecated branch ID ## Update database branch config `PATCH /v1/branches/{branch_id_or_ref}` Updates the configuration of the specified database branch ### Parameters - `branch_id_or_ref` (string, required): Branch ref or deprecated branch ID ## Update the status of an action run `PATCH /v1/projects/{ref}/actions/{run_id}/status` Updates the status of an ongoing action run. ### Parameters - `ref` (string, required): Project ref - `run_id` (string, required): Action Run ID ## OAuth ## Authorize user through oauth `GET /v1/oauth/authorize` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `client_id` (string, required) - `response_type` (string, required) - `redirect_uri` (string, required) - `scope` (string, optional) - `state` (string, optional) - `response_mode` (string, optional) - `code_challenge` (string, optional) - `code_challenge_method` (string, optional) - `organization_slug` (string, optional): Organization slug - `target_flow` (string, optional) - `resource` (string, optional): Resource indicator for MCP (Model Context Protocol) clients ## Exchange auth code for user's access and refresh token `POST /v1/oauth/token` Supports `authorization_code`, `refresh_token`, and `urn:ietf:params:oauth:grant-type:jwt-bearer` grant types. The `jwt-bearer` grant type (IDJAG — identity-directed JWT assertion) is in beta and available on Team and Enterprise plans only. This endpoint is currently in its **Beta** stage. ## Authorize user through oauth and claim a project `GET /v1/oauth/authorize/project-claim` Initiates the OAuth authorization flow for the specified provider. After successful authentication, the user can claim ownership of the specified project. ### Parameters - `project_ref` (string, required): Project ref - `client_id` (string, required) - `response_type` (string, required) - `redirect_uri` (string, required) - `state` (string, optional) - `response_mode` (string, optional) - `code_challenge` (string, optional) - `code_challenge_method` (string, optional) ## Revoke oauth app authorization and it's corresponding tokens `POST /v1/oauth/revoke` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ## Organization webhooks ## Create endpoint `POST /v2/organizations/{slug}/webhooks/endpoints` Create new endpoint configuration to subscribe to specific webhook events. ### Parameters - `slug` (string, required): Organization slug ## Delete all endpoints `DELETE /v2/organizations/{slug}/webhooks/endpoints` Delete all endpoints including all events and deliveries. Any in-flight webhooks will result in a no-op. ### Parameters - `slug` (string, required): Organization slug ## Delete endpoint `DELETE /v2/organizations/{slug}/webhooks/endpoints/{id}` Delete the endpoint including all events and deliveries Any in-flight webhooks will result in a no-op. ### Parameters - `slug` (string, required): Organization slug - `id` (string, required): Identifier of an endpoint (UUID v7). ## Get delivery `GET /v2/organizations/{slug}/webhooks/deliveries/{id}` Get details of a specific delivery attempt. ### Parameters - `slug` (string, required): Organization slug - `id` (string, required): Identifier of a delivery (UUID v7). ## Get endpoint `GET /v2/organizations/{slug}/webhooks/endpoints/{id}` Get details of a specific endpoint. ### Parameters - `slug` (string, required): Organization slug - `id` (string, required): Identifier of an endpoint (UUID v7). ## List deliveries `GET /v2/organizations/{slug}/webhooks/endpoints/{id}/deliveries` List all deliveries for a specific endpoint in descending order (newest first). Deliveries which has expired are no longer available and will not be listed. ### Parameters - `slug` (string, required): Organization slug - `id` (string, required): Identifier of an endpoint (UUID v7). - `page[before]` (string, optional): Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param. - `page[after]` (string, optional): Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param. - `page[size]` (string, optional): Up to how many records to return. ## List endpoints `GET /v2/organizations/{slug}/webhooks/endpoints` List all Webhook endpoints based on a project's ref or an organization's slug. ### Parameters - `slug` (string, required): Organization slug - `page[offset]` (string, optional): Offset for offset-based pagination. Offset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend. - `page[limit]` (string, optional): Up to how many records to return. ## Retry delivery `POST /v2/organizations/{slug}/webhooks/deliveries/{id}/retry` Retry delivering the same event again. Automatic retries are not applicable to manual retries - if the delivery fails, there won't be any automatic retries attempted. This endpoint is heavy rate-limited to allow for 10 request within 60 seconds. ### Parameters - `slug` (string, required): Organization slug - `id` (string, required): Identifier of a delivery (UUID v7). ## Send test event `POST /v2/organizations/{slug}/webhooks/endpoints/{id}/test` Ingests and schedules a test webhook event to be published out this endpoints. Which event type to use can be specified in the request body, otherwise it will use any matching type the endpoint is listening for. The event will contain `is_test: true` in it's payload. This endpoint is heavy rate-limited to allow for 10 request within 60 seconds. ### Parameters - `slug` (string, required): Organization slug - `id` (string, required): Identifier of an endpoint (UUID v7). ## Update endpoint `PATCH /v2/organizations/{slug}/webhooks/endpoints/{id}` Update endpoint's configuration. ### Parameters - `slug` (string, required): Organization slug - `id` (string, required): Identifier of an endpoint (UUID v7). ## Organizations ## Assign or change an organization member role `PATCH /v2/organizations/{slug}/members/{user_id}/roles` Assigns an org-wide role when projects is omitted, or creates a project-scoped assignment when projects is provided. Uses an org-level role template id from GET /v2/organizations/{slug}/roles. Stale role assignments are automatically cleaned up: if a role no longer has any projects, it is deleted; overlapping project assignments in other roles are automatically removed to avoid duplication. ### Parameters - `slug` (string, required): Organization slug - `user_id` (string, required) ## Create an organization `POST /v1/organizations` ## Gets information about the organization `GET /v1/organizations/{slug}` ### Parameters - `slug` (string, required): Organization slug ## Get entitlements for an organization `GET /v1/organizations/{slug}/entitlements` Returns the entitlements available to the organization based on their plan and any overrides. ### Parameters - `slug` (string, required): Organization slug ## List all organizations `GET /v1/organizations` Returns a list of organizations that you currently belong to. ## List GitHub connections of an organization `GET /v2/organizations/{slug}/integrations/github/connections` Returns a cursor-paginated list of the GitHub connections of the organization's projects. Use `page[after]` and `page[before]` to navigate pages and `page[size]` to control the page size. Paging walks the organization projects, so a page holds at most `page[size]` connections and can hold fewer (or none) when some of its projects are not connected. Follow `links.next` until it is `null` rather than stopping on a short page. Use `filter[project_ref]` to narrow the list down to a single project. ### Parameters - `slug` (string, required): Organization slug - `page` (object, optional) - `filter` (object, optional) ## List members of an organization `GET /v1/organizations/{slug}/members` ### Parameters - `slug` (string, required): Organization slug ## List members of an organization `GET /v2/organizations/{slug}/members` Returns a cursor-paginated list of organization members including their roles and project-scoped permissions. ### Parameters - `slug` (string, required): Organization slug - `page` (object, optional) - `filter` (object, optional) ## List projects of an organization `GET /v2/organizations/{slug}/projects` Returns a cursor-paginated list of projects for the specified organization, including their databases. Use `page[after]` and `page[before]` to navigate pages and `page[size]` to control the number of projects returned per page. ### Parameters - `slug` (string, required): Organization slug - `page` (object, optional) - `sort` (string, optional): Sort order by creation time: `inserted_at` (oldest first) or `-inserted_at` (newest first). Defaults to `inserted_at`. - `search` (string, optional): Case-insensitive substring match on the project name. ## List roles of an organization `GET /v2/organizations/{slug}/roles` Returns a list of org-level roles for the organization. ### Parameters - `slug` (string, required): Organization slug ## Removes organization members `DELETE /v2/organizations/{slug}/members/{user_id}` Removes one or more organization members including their roles and project-scoped permissions. ### Parameters - `slug` (string, required): Organization slug - `user_id` (string, required) ## Organizations Members Invitations ## Creates organization invitations `POST /v2/organizations/{slug}/members/invitations` Creates member invitations for an organization. Each invitation can have different role and project scope settings. ### Parameters - `slug` (string, required): Organization slug ## Deletes organization invitations by email `DELETE /v2/organizations/{slug}/members/invitations` Bulk delete member invitations for an organization by email address. ### Parameters - `slug` (string, required): Organization slug ## Profile ## Gets the user's profile `GET /v1/profile` ## Project webhooks ## Create endpoint `POST /v2/projects/{ref}/webhooks/endpoints` Create new endpoint configuration to subscribe to specific webhook events. ### Parameters - `ref` (string, required): Project ref ## Delete all endpoints `DELETE /v2/projects/{ref}/webhooks/endpoints` Delete all endpoints including all events and deliveries. Any in-flight webhooks will result in a no-op. ### Parameters - `ref` (string, required): Project ref ## Delete endpoint `DELETE /v2/projects/{ref}/webhooks/endpoints/{id}` Delete the endpoint including all events and deliveries Any in-flight webhooks will result in a no-op. ### Parameters - `ref` (string, required): Project ref - `id` (string, required): Identifier of an endpoint (UUID v7). ## Get delivery `GET /v2/projects/{ref}/webhooks/deliveries/{id}` Get details of a specific delivery attempt. ### Parameters - `ref` (string, required): Project ref - `id` (string, required): Identifier of a delivery (UUID v7). ## Get endpoint `GET /v2/projects/{ref}/webhooks/endpoints/{id}` Get details of a specific endpoint. ### Parameters - `ref` (string, required): Project ref - `id` (string, required): Identifier of an endpoint (UUID v7). ## List deliveries `GET /v2/projects/{ref}/webhooks/endpoints/{id}/deliveries` List all deliveries for a specific endpoint in descending order (newest first). Deliveries which has expired are no longer available and will not be listed. ### Parameters - `ref` (string, required): Project ref - `id` (string, required): Identifier of an endpoint (UUID v7). - `page[before]` (string, optional): Cursor in cursor-based pagination to return up to `page[size]` records before (exclusive) the entry specified by this query param. - `page[after]` (string, optional): Cursor in cursor-based pagination to return up to `page[size]` records after (exclusive) the entry specified by this query param. - `page[size]` (string, optional): Up to how many records to return. ## List endpoints `GET /v2/projects/{ref}/webhooks/endpoints` List all Webhook endpoints based on a project's ref or an organization's slug. ### Parameters - `ref` (string, required): Project ref - `page[offset]` (string, optional): Offset for offset-based pagination. Offset should be dividable by `page[limit]` without a reminder (`offset % limit === 0`), otherwise it will cause weird behavior when used on a frontend. - `page[limit]` (string, optional): Up to how many records to return. ## Retry delivery `POST /v2/projects/{ref}/webhooks/deliveries/{id}/retry` Retry delivering the same event again. Automatic retries are not applicable to manual retries - if the delivery fails, there won't be any automatic retries attempted. This endpoint is heavy rate-limited to allow for 10 request within 60 seconds. ### Parameters - `ref` (string, required): Project ref - `id` (string, required): Identifier of a delivery (UUID v7). ## Send test event `POST /v2/projects/{ref}/webhooks/endpoints/{id}/test` Ingests and schedules a test webhook event to be published out this endpoints. Which event type to use can be specified in the request body, otherwise it will use any matching type the endpoint is listening for. The event will contain `is_test: true` in it's payload. This endpoint is heavy rate-limited to allow for 10 request within 60 seconds. ### Parameters - `ref` (string, required): Project ref - `id` (string, required): Identifier of an endpoint (UUID v7). ## Update endpoint `PATCH /v2/projects/{ref}/webhooks/endpoints/{id}` Update endpoint's configuration. ### Parameters - `ref` (string, required): Project ref - `id` (string, required): Identifier of an endpoint (UUID v7). ## Projects ## Cancels the given project restoration `POST /v1/projects/{ref}/restore/cancel` ### Parameters - `ref` (string, required): Project ref ## Create a project `POST /v1/projects` ## Create a notebook `POST /v2/projects/{ref}/notebooks` Creates a notebook shared with everyone who has access to the project. Cell ids are assigned by the server and returned in the response. ### Parameters - `ref` (string, required): Project ref ## Add an AWS account to the project PrivateLink share `POST /v2/projects/{ref}/private-link/associations` Adds an AWS account to the project's PrivateLink configuration and schedules the AWS resources to be created. ### Parameters - `ref` (string, required): Project ref ## Deletes the given project `DELETE /v1/projects/{ref}` ### Parameters - `ref` (string, required): Project ref ## Remove network bans. `DELETE /v1/projects/{ref}/network-bans` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Delete a notebook `DELETE /v2/projects/{ref}/notebooks/{id}` ### Parameters - `ref` (string, required): Project ref - `id` (string, required) ## Remove an AWS account from the project PrivateLink share `DELETE /v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}` Removes an AWS account from the project's PrivateLink configuration (targeting the primary database). Cleans up the associated AWS resources. ### Parameters - `ref` (string, required): Project ref - `aws_account_id` (string, required): AWS account ID used in PrivateLink association ## Remove an AWS account from a specific database PrivateLink share `DELETE /v2/projects/{ref}/private-link/associations/aws-account/{aws_account_id}/database/{database_identifier}` Removes an AWS account from the project's PrivateLink configuration for the given read replica. Cleans up the associated AWS resources. ### Parameters - `ref` (string, required): Project ref - `aws_account_id` (string, required): AWS account ID used in PrivateLink association - `database_identifier` (string, required): Identifier of the read replica this PrivateLink association targets ## Download project backup `POST /v2/projects/{ref}/backups/download` ### Parameters - `ref` (string, required): Project ref ## Gets all projects for the given organization `GET /v1/organizations/{slug}/projects` Returns a paginated list of projects for the specified organization. This endpoint uses offset-based pagination. Use the `offset` parameter to skip a number of projects and the `limit` parameter to control the number of projects returned per page. ### Parameters - `slug` (string, required): Organization slug - `offset` (integer, optional): Number of projects to skip - `limit` (integer, optional): Number of projects to return per page - `search` (string, optional): Search projects by name - `sort` (string, optional): Sort order for projects - `statuses` (string, optional): A comma-separated list of project statuses to filter by. The following values are supported: `ACTIVE_HEALTHY`, `INACTIVE`. ## Gets the list of available regions that can be used for a new project `GET /v1/projects/available-regions` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `organization_slug` (string, required): Slug of your organization - `continent` (string, optional): Continent code to determine regional recommendations: NA (North America), SA (South America), EU (Europe), AF (Africa), AS (Asia), OC (Oceania), AN (Antarctica) - `desired_instance_size` (string, optional): Desired instance size. Omit this field to always default to the smallest possible size. ## Get database disk attributes `GET /v1/projects/{ref}/config/disk` ### Parameters - `ref` (string, required): Project ref ## Get disk utilization `GET /v1/projects/{ref}/config/disk/util` ### Parameters - `ref` (string, required): Project ref ## Gets project's network restrictions `GET /v1/projects/{ref}/network-restrictions` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Get a notebook `GET /v2/projects/{ref}/notebooks/{id}` ### Parameters - `ref` (string, required): Project ref - `id` (string, required) ## Returns the project's eligibility for upgrades `GET /v1/projects/{ref}/upgrade/eligibility` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Gets the latest status of the project's upgrade `GET /v1/projects/{ref}/upgrade/status` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref - `tracking_id` (string, optional) ## Gets a specific project that belongs to the authenticated user `GET /v1/projects/{ref}` ### Parameters - `ref` (string, required): Project ref ## Get a project's service configuration `GET /v2/projects/{ref}/config` Returns the project's database, pooler, Auth, Data API, Realtime and Storage configuration — the same configuration a branch inherits from its base project. Each is the effective config, so a setting the project has never overridden is reported at its platform default rather than as null. Auth secrets are returned as an HMAC of their value. `storage` is read live from the storage service; the rest come from this platform's own records. This endpoint is currently in its **Alpha** stage. ### Parameters - `ref` (string, required): Project ref ## Gets project disk autoscale config `GET /v1/projects/{ref}/config/disk/autoscale` ### Parameters - `ref` (string, required): Project ref ## Gets project's service health status `GET /v1/projects/{ref}/health` ### Parameters - `ref` (string, required): Project ref - `services` (string, required): Comma-separated list of enums or array of enums. - `timeout_ms` (integer, optional) ## Gets project's network bans `POST /v1/projects/{ref}/network-bans/retrieve` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Gets project's network bans with additional information about which databases they affect `POST /v1/projects/{ref}/network-bans/retrieve/enriched` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## List all projects `GET /v1/projects` Returns a list of all projects you've previously created. ## Lists available restore versions for the given project `GET /v1/projects/{ref}/restore` ### Parameters - `ref` (string, required): Project ref ## List notebooks of a project `GET /v2/projects/{ref}/notebooks` Returns a cursor-paginated list of the project notebooks. Notebook bodies are omitted — read a single notebook to get its cells. ### Parameters - `ref` (string, required): Project ref - `page` (object, optional) - `filter` (object, optional) - `sort` (string, optional) ## List AWS accounts attached to the project PrivateLink share `GET /v2/projects/{ref}/private-link/associations` ### Parameters - `ref` (string, required): Project ref ## Modify database disk `POST /v1/projects/{ref}/config/disk` ### Parameters - `ref` (string, required): Project ref ## Updates project's network restrictions by adding or removing CIDRs `PATCH /v1/projects/{ref}/network-restrictions` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Alpha** stage. ### Parameters - `ref` (string, required): Project ref ## Pauses the given project `POST /v1/projects/{ref}/pause` ### Parameters - `ref` (string, required): Project ref ## Previews transferring a project to a different organizations, shows eligibility and impact `POST /v2/projects/{ref}/transfers/previews` ### Parameters - `ref` (string, required): Project ref ## Restarts the given project `POST /v1/projects/{ref}/restart` ### Parameters - `ref` (string, required): Project ref ## Restores the given project `POST /v1/projects/{ref}/restore` ### Parameters - `ref` (string, required): Project ref ## Transfers a project to a different organization `POST /v2/projects/{ref}/transfers` ### Parameters - `ref` (string, required): Project ref ## Updates the given project `PATCH /v1/projects/{ref}` ### Parameters - `ref` (string, required): Project ref ## Updates project's network restrictions `POST /v1/projects/{ref}/network-restrictions/apply` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Update a notebook `PATCH /v2/projects/{ref}/notebooks/{id}` Updates the attributes provided and leaves the rest untouched. Sending `content` replaces the whole notebook body. ### Parameters - `ref` (string, required): Project ref - `id` (string, required) ## Upgrades the project's Postgres version `POST /v1/projects/{ref}/upgrade` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Realtime ## Gets realtime configuration `GET /v1/projects/{ref}/config/realtime` ### Parameters - `ref` (string, required): Project ref ## Shutdowns realtime connections for a project `POST /v1/projects/{ref}/config/realtime/shutdown` ### Parameters - `ref` (string, required): Project ref ## Updates realtime configuration `PATCH /v1/projects/{ref}/config/realtime` ### Parameters - `ref` (string, required): Project ref ## Rest ## Gets project's postgrest config `GET /v1/projects/{ref}/postgrest` ### Parameters - `ref` (string, required): Project ref ## Updates project's postgrest config `PATCH /v1/projects/{ref}/postgrest` ### Parameters - `ref` (string, required): Project ref ## Secrets ## Bulk create secrets `POST /v1/projects/{ref}/secrets` Creates multiple secrets and adds them to the specified project. ### Parameters - `ref` (string, required): Project ref ## Bulk delete secrets `DELETE /v1/projects/{ref}/secrets` Deletes all secrets with the given names from the specified project ### Parameters - `ref` (string, required): Project ref ## Creates a new API key for the project `POST /v1/projects/{ref}/api-keys` ### Parameters - `ref` (string, required): Project ref - `reveal` (string, optional): Boolean string. Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` ## Deletes an API key for the project `DELETE /v1/projects/{ref}/api-keys/{id}` ### Parameters - `ref` (string, required): Project ref - `id` (string, required) - `reveal` (string, optional): Boolean string, true or false - `was_compromised` (string, optional): Boolean string, true or false - `reason` (string, optional) ## Gets project's pgsodium config `GET /v1/projects/{ref}/pgsodium` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Get API key `GET /v1/projects/{ref}/api-keys/{id}` ### Parameters - `ref` (string, required): Project ref - `id` (string, required) - `reveal` (string, optional): Boolean string. Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` ## Get project api keys `GET /v1/projects/{ref}/api-keys` ### Parameters - `ref` (string, required): Project ref - `reveal` (string, optional): Boolean string. Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` ## Check whether JWT based legacy (anon, service\_role) API keys are enabled. This API endpoint will be removed in the future, check for HTTP 404 Not Found. `GET /v1/projects/{ref}/api-keys/legacy` ### Parameters - `ref` (string, required): Project ref ## List all secrets `GET /v1/projects/{ref}/secrets` Returns all secrets you've previously added to the specified project. ### Parameters - `ref` (string, required): Project ref ## Updates project's pgsodium config. Updating the root\_key can cause all data encrypted with the older key to become inaccessible. `PUT /v1/projects/{ref}/pgsodium` This is an **experimental** endpoint. It is subject to change or removal in future versions. Use it with caution, as it may not remain supported or stable. This endpoint is currently in its **Beta** stage. ### Parameters - `ref` (string, required): Project ref ## Updates an API key for the project `PATCH /v1/projects/{ref}/api-keys/{id}` ### Parameters - `ref` (string, required): Project ref - `id` (string, required) - `reveal` (string, optional): Boolean string. Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` ## Disable or re-enable JWT based legacy (anon, service\_role) API keys. This API endpoint will be removed in the future, check for HTTP 404 Not Found. `PUT /v1/projects/{ref}/api-keys/legacy` ### Parameters - `ref` (string, required): Project ref - `enabled` (string, required): Boolean string. Truthy values: `true`, `1`, `yes`, `on`, `y`, `enabled` Falsy values: `false`, `0`, `no`, `off`, `n`, `disabled` ## Storage ## Gets project's storage config `GET /v1/projects/{ref}/config/storage` ### Parameters - `ref` (string, required): Project ref ## Lists all buckets `GET /v1/projects/{ref}/storage/buckets` ### Parameters - `ref` (string, required): Project ref ## Updates project's storage config `PATCH /v1/projects/{ref}/config/storage` ### Parameters - `ref` (string, required): Project ref