Management API
Use the Assistance Management API to automate platform and service operations.
Gets project performance advisors.deprecated
/v1/projects/{ref}/advisors/performanceThis 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.
OAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- advisors_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
Gets project security advisors.deprecated
/v1/projects/{ref}/advisors/securityThis 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.
OAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- advisors_read
Path parameters
- refRequiredstring
Project ref
Query parameters
- lint_typeOptionalenum
Response codes
- 200
- 401
- 403
- 429
Gets a project's function combined statistics
/v1/projects/{ref}/analytics/endpoints/functions.combined-statsThe fine-grained token must include the following permissions to access this endpoint:
- analytics_usage_read
Path parameters
- refRequiredstring
Project ref
Query parameters
- intervalRequiredenum
- function_idRequiredstring
Response codes
- 200
- 401
- 403
- 429
- 500
Gets project's logs
/v1/projects/{ref}/analytics/endpoints/logs.allExecutes a SQL query on the project's logs.
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.
Note: Unless the sql parameter is provided, only edge_logs will be queried. See the log query docs for all available sources.
OAuth scopes
- analytics:read
The fine-grained token must include the following permissions to access this endpoint:
- analytics_logs_read
Path parameters
- refRequiredstring
Project ref
Query parameters
- sqlOptionalstring
Custom SQL query to execute on the logs. See querying logs for more details.
- iso_timestamp_startOptionalstring
- iso_timestamp_endOptionalstring
Response codes
- 200
- 401
- 403
- 429
Gets project's usage api counts
/v1/projects/{ref}/analytics/endpoints/usage.api-countsThe fine-grained token must include the following permissions to access this endpoint:
- analytics_usage_read
Path parameters
- refRequiredstring
Project ref
Query parameters
- intervalOptionalenum
Response codes
- 200
- 401
- 403
- 429
- 500
Gets project's usage api requests count
/v1/projects/{ref}/analytics/endpoints/usage.api-requests-countThe fine-grained token must include the following permissions to access this endpoint:
- analytics_usage_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Creates a new SSO provider
/v1/projects/{ref}/config/auth/sso/providersOAuth scopes
- auth:write
The fine-grained token must include the following permissions to access this endpoint:
- auth_config_write
Path parameters
- refRequiredstring
Project ref
Body
- typeRequiredenum
- metadata_xmlOptionalstring
- metadata_urlOptionalstring
- domainsOptionalArray<string>
- attribute_mappingOptionalobject
- name_id_formatOptionalenum
Response codes
- 201
- 401
- 403
- 404
- 429
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.
/v1/projects/{ref}/config/auth/signing-keys/legacyOAuth scopes
- secrets:write
The fine-grained token must include the following permissions to access this endpoint:
- auth_signing_keys_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 201
- 401
- 403
- 429
Create a new signing key for the project in standby status
/v1/projects/{ref}/config/auth/signing-keysOAuth scopes
- secrets:write
The fine-grained token must include the following permissions to access this endpoint:
- auth_signing_keys_write
Path parameters
- refRequiredstring
Project ref
Body
- algorithmRequiredenum
- statusOptionalenum
- private_jwkOptionalone of the following options
Response codes
- 201
- 401
- 403
- 429
Creates a new third-party auth integration
/v1/projects/{ref}/config/auth/third-party-authOAuth scopes
- auth:write
The fine-grained token must include the following permissions to access this endpoint:
- auth_config_write
Path parameters
- refRequiredstring
Project ref
Body
- oidc_issuer_urlOptionalstring
- jwks_urlOptionalstring
- custom_jwksOptionalunknown
Response codes
- 201
- 401
- 403
- 429
Removes a SSO provider by its UUID
/v1/projects/{ref}/config/auth/sso/providers/{provider_id}OAuth scopes
- auth:write
The fine-grained token must include the following permissions to access this endpoint:
- auth_config_write
Path parameters
- refRequiredstring
Project ref
- provider_idRequiredstring
Response codes
- 200
- 401
- 403
- 404
- 429
Removes a third-party auth integration
/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}OAuth scopes
- auth:write
The fine-grained token must include the following permissions to access this endpoint:
- auth_config_write
Path parameters
- refRequiredstring
Project ref
- tpa_idRequiredstring
Response codes
- 200
- 401
- 403
- 429
Gets a SSO provider by its UUID
/v1/projects/{ref}/config/auth/sso/providers/{provider_id}OAuth scopes
- auth:read
The fine-grained token must include the following permissions to access this endpoint:
- auth_config_read
Path parameters
- refRequiredstring
Project ref
- provider_idRequiredstring
Response codes
- 200
- 401
- 403
- 404
- 429
Gets project's auth config
/v1/projects/{ref}/config/authOAuth scopes
- auth:read
The fine-grained token must include the following permissions to access this endpoint:
- auth_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
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.
/v1/projects/{ref}/config/auth/signing-keys/legacyOAuth scopes
- secrets:read
The fine-grained token must include the following permissions to access this endpoint:
- auth_signing_keys_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
Get information about a signing key
/v1/projects/{ref}/config/auth/signing-keys/{id}The fine-grained token must include the following permissions to access this endpoint:
- auth_signing_keys_read
Path parameters
- idRequiredstring
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
List all signing keys for the project
/v1/projects/{ref}/config/auth/signing-keysOAuth scopes
- secrets:read
The fine-grained token must include the following permissions to access this endpoint:
- auth_signing_keys_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
Get a third-party integration
/v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}OAuth scopes
- auth:read
The fine-grained token must include the following permissions to access this endpoint:
- auth_config_read
Path parameters
- refRequiredstring
Project ref
- tpa_idRequiredstring
Response codes
- 200
- 401
- 403
- 429
Lists all SSO providers
/v1/projects/{ref}/config/auth/sso/providersOAuth scopes
- auth:read
The fine-grained token must include the following permissions to access this endpoint:
- auth_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 404
- 429
Lists all third-party auth integrations
/v1/projects/{ref}/config/auth/third-party-authOAuth scopes
- auth:read
The fine-grained token must include the following permissions to access this endpoint:
- auth_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
Remove a signing key from a project. Only possible if the key has been in revoked status for a while.
/v1/projects/{ref}/config/auth/signing-keys/{id}OAuth scopes
- secrets:write
The fine-grained token must include the following permissions to access this endpoint:
- auth_signing_keys_write
Path parameters
- idRequiredstring
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
Updates a SSO provider by its UUID
/v1/projects/{ref}/config/auth/sso/providers/{provider_id}OAuth scopes
- auth:write
The fine-grained token must include the following permissions to access this endpoint:
- auth_config_write
Path parameters
- refRequiredstring
Project ref
- provider_idRequiredstring
Body
- metadata_xmlOptionalstring
- metadata_urlOptionalstring
- domainsOptionalArray<string>
- attribute_mappingOptionalobject
- name_id_formatOptionalenum
Response codes
- 200
- 401
- 403
- 404
- 429
Updates a project's auth config
/v1/projects/{ref}/config/authOAuth scopes
- auth:write
The fine-grained token must include the following permissions to access this endpoint:
- auth_config_write
- project_admin_write
Path parameters
- refRequiredstring
Project ref
Body
- site_urlOptionalstring
- disable_signupOptionalboolean
- jwt_expOptionalinteger
- smtp_admin_emailOptionalstring
- smtp_hostOptionalstring
- smtp_portOptionalstring
- smtp_userOptionalstring
- smtp_passOptionalstring
- smtp_max_frequencyOptionalinteger
- smtp_sender_nameOptionalstring
- mailer_allow_unverified_email_sign_insOptionalboolean
- mailer_autoconfirmOptionalboolean
- mailer_subjects_inviteOptionalstring
- mailer_subjects_confirmationOptionalstring
- mailer_subjects_recoveryOptionalstring
- mailer_subjects_email_changeOptionalstring
- mailer_subjects_magic_linkOptionalstring
- mailer_subjects_reauthenticationOptionalstring
- mailer_subjects_password_changed_notificationOptionalstring
- mailer_subjects_email_changed_notificationOptionalstring
- mailer_subjects_phone_changed_notificationOptionalstring
- mailer_subjects_mfa_factor_enrolled_notificationOptionalstring
- mailer_subjects_mfa_factor_unenrolled_notificationOptionalstring
- mailer_subjects_identity_linked_notificationOptionalstring
- mailer_subjects_identity_unlinked_notificationOptionalstring
- mailer_templates_invite_contentOptionalstring
- mailer_templates_confirmation_contentOptionalstring
- mailer_templates_recovery_contentOptionalstring
- mailer_templates_email_change_contentOptionalstring
- mailer_templates_magic_link_contentOptionalstring
- mailer_templates_reauthentication_contentOptionalstring
- mailer_templates_password_changed_notification_contentOptionalstring
- mailer_templates_email_changed_notification_contentOptionalstring
- mailer_templates_phone_changed_notification_contentOptionalstring
- mailer_templates_mfa_factor_enrolled_notification_contentOptionalstring
- mailer_templates_mfa_factor_unenrolled_notification_contentOptionalstring
- mailer_templates_identity_linked_notification_contentOptionalstring
- mailer_templates_identity_unlinked_notification_contentOptionalstring
- mailer_notifications_password_changed_enabledOptionalboolean
- mailer_notifications_email_changed_enabledOptionalboolean
- mailer_notifications_phone_changed_enabledOptionalboolean
- mailer_notifications_mfa_factor_enrolled_enabledOptionalboolean
- mailer_notifications_mfa_factor_unenrolled_enabledOptionalboolean
- mailer_notifications_identity_linked_enabledOptionalboolean
- mailer_notifications_identity_unlinked_enabledOptionalboolean
- mfa_max_enrolled_factorsOptionalinteger
- uri_allow_listOptionalstring
- external_anonymous_users_enabledOptionalboolean
- external_email_enabledOptionalboolean
- external_phone_enabledOptionalboolean
- saml_enabledOptionalboolean
- saml_external_urlOptionalstring
- security_sb_forwarded_for_enabledOptionalboolean
- security_captcha_enabledOptionalboolean
- security_captcha_providerOptionalenum
- security_captcha_secretOptionalstring
- sessions_timeboxOptionalinteger
- sessions_inactivity_timeoutOptionalinteger
- sessions_single_per_userOptionalboolean
- sessions_tagsOptionalstring
- rate_limit_anonymous_usersOptionalinteger
- rate_limit_email_sentOptionalinteger
- rate_limit_sms_sentOptionalinteger
- rate_limit_verifyOptionalinteger
- rate_limit_token_refreshOptionalinteger
- rate_limit_otpOptionalinteger
- rate_limit_web3Optionalinteger
- mailer_secure_email_change_enabledOptionalboolean
- refresh_token_rotation_enabledOptionalboolean
- password_hibp_enabledOptionalboolean
- password_min_lengthOptionalinteger
- password_required_charactersOptionalenum
- security_manual_linking_enabledOptionalboolean
- security_update_password_require_reauthenticationOptionalboolean
- security_refresh_token_reuse_intervalOptionalinteger
- mailer_otp_expOptionalinteger
- mailer_otp_lengthOptionalinteger
- sms_autoconfirmOptionalboolean
- sms_max_frequencyOptionalinteger
- sms_otp_expOptionalinteger
- sms_otp_lengthOptionalinteger
- sms_providerOptionalenum
- sms_messagebird_access_keyOptionalstring
- sms_messagebird_originatorOptionalstring
- sms_test_otpOptionalstring
- sms_test_otp_valid_untilOptionalstring
- sms_textlocal_api_keyOptionalstring
- sms_textlocal_senderOptionalstring
- sms_twilio_account_sidOptionalstring
- sms_twilio_auth_tokenOptionalstring
- sms_twilio_content_sidOptionalstring
- sms_twilio_message_service_sidOptionalstring
- sms_twilio_verify_account_sidOptionalstring
- sms_twilio_verify_auth_tokenOptionalstring
- sms_twilio_verify_message_service_sidOptionalstring
- sms_vonage_api_keyOptionalstring
- sms_vonage_api_secretOptionalstring
- sms_vonage_fromOptionalstring
- sms_templateOptionalstring
- hook_mfa_verification_attempt_enabledOptionalboolean
- hook_mfa_verification_attempt_uriOptionalstring
- hook_mfa_verification_attempt_secretsOptionalstring
- hook_password_verification_attempt_enabledOptionalboolean
- hook_password_verification_attempt_uriOptionalstring
- hook_password_verification_attempt_secretsOptionalstring
- hook_custom_access_token_enabledOptionalboolean
- hook_custom_access_token_uriOptionalstring
- hook_custom_access_token_secretsOptionalstring
- hook_send_sms_enabledOptionalboolean
- hook_send_sms_uriOptionalstring
- hook_send_sms_secretsOptionalstring
- hook_send_email_enabledOptionalboolean
- hook_send_email_uriOptionalstring
- hook_send_email_secretsOptionalstring
- hook_before_user_created_enabledOptionalboolean
- hook_before_user_created_uriOptionalstring
- hook_before_user_created_secretsOptionalstring
- hook_after_user_created_enabledOptionalboolean
- hook_after_user_created_uriOptionalstring
- hook_after_user_created_secretsOptionalstring
- external_apple_enabledOptionalboolean
- external_apple_client_idOptionalstring
- external_apple_email_optionalOptionalboolean
- external_apple_secretOptionalstring
- external_apple_additional_client_idsOptionalstring
- external_azure_enabledOptionalboolean
- external_azure_client_idOptionalstring
- external_azure_email_optionalOptionalboolean
- external_azure_secretOptionalstring
- external_azure_urlOptionalstring
- external_bitbucket_enabledOptionalboolean
- external_bitbucket_client_idOptionalstring
- external_bitbucket_email_optionalOptionalboolean
- external_bitbucket_secretOptionalstring
- external_discord_enabledOptionalboolean
- external_discord_client_idOptionalstring
- external_discord_email_optionalOptionalboolean
- external_discord_secretOptionalstring
- external_facebook_enabledOptionalboolean
- external_facebook_client_idOptionalstring
- external_facebook_email_optionalOptionalboolean
- external_facebook_secretOptionalstring
- external_figma_enabledOptionalboolean
- external_figma_client_idOptionalstring
- external_figma_email_optionalOptionalboolean
- external_figma_secretOptionalstring
- external_github_enabledOptionalboolean
- external_github_client_idOptionalstring
- external_github_email_optionalOptionalboolean
- external_github_secretOptionalstring
- external_gitlab_enabledOptionalboolean
- external_gitlab_client_idOptionalstring
- external_gitlab_email_optionalOptionalboolean
- external_gitlab_secretOptionalstring
- external_gitlab_urlOptionalstring
- external_google_enabledOptionalboolean
- external_google_client_idOptionalstring
- external_google_email_optionalOptionalboolean
- external_google_secretOptionalstring
- external_google_additional_client_idsOptionalstring
- external_google_skip_nonce_checkOptionalboolean
- external_kakao_enabledOptionalboolean
- external_kakao_client_idOptionalstring
- external_kakao_email_optionalOptionalboolean
- external_kakao_secretOptionalstring
- external_keycloak_enabledOptionalboolean
- external_keycloak_client_idOptionalstring
- external_keycloak_email_optionalOptionalboolean
- external_keycloak_secretOptionalstring
- external_keycloak_urlOptionalstring
- external_linkedin_oidc_enabledOptionalboolean
- external_linkedin_oidc_client_idOptionalstring
- external_linkedin_oidc_email_optionalOptionalboolean
- external_linkedin_oidc_secretOptionalstring
- external_slack_oidc_enabledOptionalboolean
- external_slack_oidc_client_idOptionalstring
- external_slack_oidc_email_optionalOptionalboolean
- external_slack_oidc_secretOptionalstring
- external_notion_enabledOptionalboolean
- external_notion_client_idOptionalstring
- external_notion_email_optionalOptionalboolean
- external_notion_secretOptionalstring
- external_slack_enabledOptionalboolean
- external_slack_client_idOptionalstring
- external_slack_email_optionalOptionalboolean
- external_slack_secretOptionalstring
- external_spotify_enabledOptionalboolean
- external_spotify_client_idOptionalstring
- external_spotify_email_optionalOptionalboolean
- external_spotify_secretOptionalstring
- external_twitch_enabledOptionalboolean
- external_twitch_client_idOptionalstring
- external_twitch_email_optionalOptionalboolean
- external_twitch_secretOptionalstring
- external_twitter_enabledOptionalboolean
- external_twitter_client_idOptionalstring
- external_twitter_email_optionalOptionalboolean
- external_twitter_secretOptionalstring
- external_x_enabledOptionalboolean
- external_x_client_idOptionalstring
- external_x_email_optionalOptionalboolean
- external_x_secretOptionalstring
- external_workos_enabledOptionalboolean
- external_workos_client_idOptionalstring
- external_workos_secretOptionalstring
- external_workos_urlOptionalstring
- external_web3_solana_enabledOptionalboolean
- external_web3_ethereum_enabledOptionalboolean
- external_zoom_enabledOptionalboolean
- external_zoom_client_idOptionalstring
- external_zoom_email_optionalOptionalboolean
- external_zoom_secretOptionalstring
- db_max_pool_sizeOptionalinteger
- db_max_pool_size_unitOptionalenum
- api_max_request_durationOptionalinteger
- mfa_totp_enroll_enabledOptionalboolean
- mfa_totp_verify_enabledOptionalboolean
- mfa_web_authn_enroll_enabledOptionalboolean
- mfa_web_authn_verify_enabledOptionalboolean
- mfa_phone_enroll_enabledOptionalboolean
- mfa_phone_verify_enabledOptionalboolean
- mfa_phone_max_frequencyOptionalinteger
- mfa_phone_otp_lengthOptionalinteger
- mfa_phone_templateOptionalstring
- nimbus_oauth_client_idOptionalstring
- nimbus_oauth_client_secretOptionalstring
- oauth_server_enabledOptionalboolean
- oauth_server_allow_dynamic_registrationOptionalboolean
- oauth_server_authorization_pathOptionalstring
- custom_oauth_enabledOptionalboolean
Response codes
- 200
- 401
- 403
- 429
- 500
Update a signing key, mainly its status
/v1/projects/{ref}/config/auth/signing-keys/{id}OAuth scopes
- secrets:write
The fine-grained token must include the following permissions to access this endpoint:
- auth_signing_keys_write
Path parameters
- idRequiredstring
- refRequiredstring
Project ref
Body
- statusRequiredenum
Response codes
- 200
- 401
- 403
- 429
Apply or update billing addons, including compute instance size
/v1/projects/{ref}/billing/addonsSelects an addon variant, for example scaling the project’s compute instance up or down, and applies it to the project.
The fine-grained token must include the following permissions to access this endpoint:
- infra_add_ons_write
Path parameters
- refRequiredstring
Project ref
Body
- addon_variantRequiredone of the following options
- addon_typeRequiredenum
Response codes
- 200
- 401
- 403
- 429
- 500
List billing addons and compute instance selections
/v1/projects/{ref}/billing/addonsReturns 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.
The fine-grained token must include the following permissions to access this endpoint:
- infra_add_ons_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Remove billing addons or revert compute instance sizing
/v1/projects/{ref}/billing/addons/{addon_variant}Disables the selected addon variant, including rolling the compute instance back to its previous size.
The fine-grained token must include the following permissions to access this endpoint:
- infra_add_ons_write
Path parameters
- refRequiredstring
Project ref
- addon_variantRequiredone of the following options
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Apply a database migration
/v1/projects/{ref}/database/migrationsOnly available to selected partner OAuth apps
OAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_migrations_write
Path parameters
- refRequiredstring
Project ref
Body
- queryRequiredstring
- nameOptionalstring
- rollbackOptionalstring
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Create a login role for CLI with temporary password
/v1/projects/{ref}/cli/login-roleOAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_write
Path parameters
- refRequiredstring
Project ref
Body
- read_onlyRequiredboolean
Response codes
- 201
- 401
- 403
- 429
- 500
Delete JIT access by user-id
/v1/projects/{ref}/database/jit/{user_id}Remove JIT mappings of a user, revoking all JIT database access
The fine-grained token must include the following permissions to access this endpoint:
- database_jit_write
Path parameters
- refRequiredstring
Project ref
- user_idRequiredstring
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Delete existing login roles used by CLI
/v1/projects/{ref}/cli/login-roleOAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Disables project's readonly mode for the next 15 minutes
/v1/projects/{ref}/readonly/temporary-disableOAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_readonly_config_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 201
- 401
- 403
- 429
- 500
[Beta] Enables Database Webhooks on the project
/v1/projects/{ref}/database/webhooks/enableOAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_webhooks_config_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 201
- 401
- 403
- 429
- 500
Generate TypeScript types
/v1/projects/{ref}/types/typescriptReturns the TypeScript types of your schema for use with assistance-js.
OAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- database_read
Path parameters
- refRequiredstring
Project ref
Query parameters
- included_schemasOptionalstring
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Fetch an existing entry from migration history
/v1/projects/{ref}/database/migrations/{version}Only available to selected partner OAuth apps
OAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- database_migrations_read
Path parameters
- refRequiredstring
Project ref
- versionRequiredstring
Response codes
- 200
- 401
- 403
- 429
- 500
Gets a specific SQL snippet
/v1/snippets/{id}OAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- snippets_read
Path parameters
- idRequiredstring
Response codes
- 200
- 500
Gets database metadata for the given project.deprecated
/v1/projects/{ref}/database/contextThis 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.
OAuth scopes
- projects:read
The fine-grained token must include the following permissions to access this endpoint:
- database_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
Get user-id to role mappings for JIT access
/v1/projects/{ref}/database/jitMappings of roles a user can assume in the project database
OAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- database_jit_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Get project's just-in-time access configuration.
/v1/projects/{ref}/jit-accessOAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Gets project's supavisor config
/v1/projects/{ref}/config/database/poolerOAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- database_pooling_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Gets project's Postgres config
/v1/projects/{ref}/config/database/postgresOAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- database_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Get project's pgbouncer config
/v1/projects/{ref}/config/database/pgbouncerOAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- database_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Returns project's readonly mode status
/v1/projects/{ref}/readonlyOAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- database_readonly_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Get project's SSL enforcement configuration.
/v1/projects/{ref}/ssl-enforcementOAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- database_ssl_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Lists all backups
/v1/projects/{ref}/database/backupsOAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- backups_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Lists SQL snippets for the logged in user
/v1/snippetsOAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- snippets_read
Query parameters
- project_refOptionalstring
Project ref
- cursorOptionalstring
- limitOptionalstring
- sort_byOptionalenum
- sort_orderOptionalenum
Response codes
- 200
- 500
List all user-id to role mappings for JIT access
/v1/projects/{ref}/database/jit/listMappings of roles a user can assume in the project database
The fine-grained token must include the following permissions to access this endpoint:
- database_jit_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] List applied migration versions
/v1/projects/{ref}/database/migrationsOnly available to selected partner OAuth apps
OAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- database_migrations_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Patch an existing entry in migration history
/v1/projects/{ref}/database/migrations/{version}Only available to selected partner OAuth apps
OAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_migrations_write
Path parameters
- refRequiredstring
Project ref
- versionRequiredstring
Body
- nameOptionalstring
- rollbackOptionalstring
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Run a sql query as assistance_read_only_user
/v1/projects/{ref}/database/query/read-onlyAll entity references must be schema qualified.
OAuth scopes
- database:read
The fine-grained token must include the following permissions to access this endpoint:
- database_read
Path parameters
- refRequiredstring
Project ref
Body
- queryRequiredstring
- parametersOptionalArray<unknown>
Response codes
- 201
- 401
- 403
- 429
- 500
[Beta] Remove a read replica
/v1/projects/{ref}/read-replicas/removeThe fine-grained token must include the following permissions to access this endpoint:
- infra_read_replicas_write
Path parameters
- refRequiredstring
Project ref
Body
- database_identifierRequiredstring
Response codes
- 201
- 401
- 403
- 429
- 500
Restores a PITR backup for a database
/v1/projects/{ref}/database/backups/restore-pitrOAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- backups_write
Path parameters
- refRequiredstring
Project ref
Body
- recovery_time_target_unixRequiredinteger
Response codes
- 201
- 401
- 403
- 429
[Beta] Rollback database migrations and remove them from history table
/v1/projects/{ref}/database/migrationsOnly available to selected partner OAuth apps
OAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_migrations_write
Path parameters
- refRequiredstring
Project ref
Query parameters
- gteRequiredstring
Rollback migrations greater or equal to this version
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Run sql query
/v1/projects/{ref}/database/queryOAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_write
- or
- database_read
Path parameters
- refRequiredstring
Project ref
Body
- queryRequiredstring
- parametersOptionalArray<unknown>
- read_onlyOptionalboolean
Response codes
- 201
- 401
- 403
- 429
- 500
[Beta] Set up a read replica
/v1/projects/{ref}/read-replicas/setupThe fine-grained token must include the following permissions to access this endpoint:
- infra_read_replicas_write
Path parameters
- refRequiredstring
Project ref
Body
- read_replica_regionRequiredenum
Response codes
- 201
- 401
- 403
- 429
- 500
Updates the database password
/v1/projects/{ref}/database/passwordOAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_write
Path parameters
- refRequiredstring
Project ref
Body
- passwordRequiredstring
Response codes
- 200
- 401
- 403
- 429
- 500
Updates a user mapping for JIT access
/v1/projects/{ref}/database/jitModifies the roles that can be assumed and for how long
The fine-grained token must include the following permissions to access this endpoint:
- database_jit_write
Path parameters
- refRequiredstring
Project ref
Body
- user_idRequiredstring
- rolesRequiredArray<object>
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Update project's just-in-time access configuration.
/v1/projects/{ref}/jit-accessOAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_write
Path parameters
- refRequiredstring
Project ref
Body
- stateRequiredenum
Response codes
- 200
- 401
- 403
- 429
- 500
Updates project's supavisor config
/v1/projects/{ref}/config/database/poolerOAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_pooling_config_write
Path parameters
- refRequiredstring
Project ref
Body
- default_pool_sizeOptionalinteger
- pool_modeOptionalenum
Response codes
- 200
- 401
- 403
- 429
- 500
Updates project's Postgres config
/v1/projects/{ref}/config/database/postgresOAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_config_write
Path parameters
- refRequiredstring
Project ref
Body
- effective_cache_sizeOptionalstring
- logical_decoding_work_memOptionalstring
- maintenance_work_memOptionalstring
- track_activity_query_sizeOptionalstring
- max_connectionsOptionalinteger
- max_locks_per_transactionOptionalinteger
- max_parallel_maintenance_workersOptionalinteger
- max_parallel_workersOptionalinteger
- max_parallel_workers_per_gatherOptionalinteger
- max_replication_slotsOptionalinteger
- max_slot_wal_keep_sizeOptionalstring
- max_standby_archive_delayOptionalstring
- max_standby_streaming_delayOptionalstring
- max_wal_sizeOptionalstring
- max_wal_sendersOptionalinteger
- max_worker_processesOptionalinteger
- session_replication_roleOptionalenum
- shared_buffersOptionalstring
- statement_timeoutOptionalstring
- track_commit_timestampOptionalboolean
- wal_keep_sizeOptionalstring
- wal_sender_timeoutOptionalstring
- work_memOptionalstring
- checkpoint_timeoutOptionalstring
- hot_standby_feedbackOptionalboolean
- restart_databaseOptionalboolean
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Update project's SSL enforcement configuration.
/v1/projects/{ref}/ssl-enforcementOAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_ssl_config_write
Path parameters
- refRequiredstring
Project ref
Body
- requestedConfigRequiredobject
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Upsert a database migration without applying
/v1/projects/{ref}/database/migrationsOnly available to selected partner OAuth apps
OAuth scopes
- database:write
The fine-grained token must include the following permissions to access this endpoint:
- database_migrations_write
Path parameters
- refRequiredstring
Project ref
Body
- queryRequiredstring
- nameOptionalstring
- rollbackOptionalstring
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Activates a custom hostname for a project.
/v1/projects/{ref}/custom-hostname/activateOAuth scopes
- domains:write
The fine-grained token must include the following permissions to access this endpoint:
- custom_domain_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 201
- 401
- 403
- 429
- 500
[Beta] Activates a vanity subdomain for a project.
/v1/projects/{ref}/vanity-subdomain/activateOAuth scopes
- domains:write
The fine-grained token must include the following permissions to access this endpoint:
- vanity_subdomain_write
Path parameters
- refRequiredstring
Project ref
Body
- vanity_subdomainRequiredstring
Response codes
- 201
- 401
- 403
- 429
- 500
[Beta] Checks vanity subdomain availability
/v1/projects/{ref}/vanity-subdomain/check-availabilityOAuth scopes
- domains:write
The fine-grained token must include the following permissions to access this endpoint:
- vanity_subdomain_write
Path parameters
- refRequiredstring
Project ref
Body
- vanity_subdomainRequiredstring
Response codes
- 201
- 401
- 403
- 429
- 500
[Beta] Deletes a project's vanity subdomain configuration
/v1/projects/{ref}/vanity-subdomainOAuth scopes
- domains:write
The fine-grained token must include the following permissions to access this endpoint:
- vanity_subdomain_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Gets project's custom hostname config
/v1/projects/{ref}/custom-hostnameOAuth scopes
- domains:read
The fine-grained token must include the following permissions to access this endpoint:
- custom_domain_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Gets current vanity subdomain config
/v1/projects/{ref}/vanity-subdomainOAuth scopes
- domains:read
The fine-grained token must include the following permissions to access this endpoint:
- vanity_subdomain_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Updates project's custom hostname configuration
/v1/projects/{ref}/custom-hostname/initializeOAuth scopes
- domains:write
The fine-grained token must include the following permissions to access this endpoint:
- custom_domain_write
Path parameters
- refRequiredstring
Project ref
Body
- custom_hostnameRequiredstring
Response codes
- 201
- 401
- 403
- 429
- 500
[Beta] Attempts to verify the DNS configuration for project's custom hostname configuration
/v1/projects/{ref}/custom-hostname/reverifyOAuth scopes
- domains:write
The fine-grained token must include the following permissions to access this endpoint:
- custom_domain_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 201
- 401
- 403
- 429
- 500
Bulk update functions
/v1/projects/{ref}/functionsBulk update functions. It will create a new function or replace existing. The operation is idempotent. NOTE: You will need to manually bump the version.
OAuth scopes
- edge_functions:write
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_write
Path parameters
- refRequiredstring
Project ref
Body
Response codes
- 200
- 401
- 402
- 403
- 429
- 500
Create a functiondeprecated
/v1/projects/{ref}/functionsThis endpoint is deprecated - use the deploy endpoint. Creates a function and adds it to the specified project.
OAuth scopes
- edge_functions:write
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_write
Path parameters
- refRequiredstring
Project ref
Query parameters
- slugOptionalstring
- nameOptionalstring
- verify_jwtOptionalboolean
Boolean string, true or false
- import_mapOptionalboolean
Boolean string, true or false
- entrypoint_pathOptionalstring
- import_map_pathOptionalstring
- ezbr_sha256Optionalstring
Body
- slugRequiredstring
- nameRequiredstring
- bodyRequiredstring
- verify_jwtOptionalboolean
Response codes
- 201
- 401
- 402
- 403
- 429
- 500
Delete a function
/v1/projects/{ref}/functions/{function_slug}Deletes a function with the specified slug from the specified project.
OAuth scopes
- edge_functions:write
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_write
Path parameters
- refRequiredstring
Project ref
- function_slugRequiredstring
Function slug
Response codes
- 200
- 401
- 403
- 429
- 500
Deploy a function
/v1/projects/{ref}/functions/deployA new endpoint to deploy functions. It will create if function does not exist.
OAuth scopes
- edge_functions:write
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_write
Path parameters
- refRequiredstring
Project ref
Query parameters
- slugOptionalstring
- bundleOnlyOptionalboolean
Boolean string, true or false
Body
- fileOptionalArray<string>
- metadataRequiredobject
Response codes
- 201
- 401
- 402
- 403
- 429
- 500
Retrieve a function
/v1/projects/{ref}/functions/{function_slug}Retrieves a function with the specified slug and project.
OAuth scopes
- edge_functions:read
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_read
Path parameters
- refRequiredstring
Project ref
- function_slugRequiredstring
Function slug
Response codes
- 200
- 401
- 403
- 429
- 500
Retrieve a function body
/v1/projects/{ref}/functions/{function_slug}/bodyRetrieves a function body for the specified slug and project.
OAuth scopes
- edge_functions:read
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_read
Path parameters
- refRequiredstring
Project ref
- function_slugRequiredstring
Function slug
Response codes
- 200
- 401
- 403
- 429
- 500
List all functions
/v1/projects/{ref}/functionsReturns all functions you've previously added to the specified project.
OAuth scopes
- edge_functions:read
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Update a function
/v1/projects/{ref}/functions/{function_slug}Updates a function with the specified slug and project.
OAuth scopes
- edge_functions:write
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_write
Path parameters
- refRequiredstring
Project ref
- function_slugRequiredstring
Function slug
Query parameters
- slugOptionalstring
- nameOptionalstring
- verify_jwtOptionalboolean
Boolean string, true or false
- import_mapOptionalboolean
Boolean string, true or false
- entrypoint_pathOptionalstring
- import_map_pathOptionalstring
- ezbr_sha256Optionalstring
Body
- nameOptionalstring
- bodyOptionalstring
- verify_jwtOptionalboolean
Response codes
- 200
- 401
- 403
- 429
- 500
Count the number of action runs
/v1/projects/{ref}/actionsReturns the total number of action runs of the specified project.
OAuth scopes
- environment:read
The fine-grained token must include the following permissions to access this endpoint:
- action_runs_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Create a database branch
/v1/projects/{ref}/branchesCreates a database branch from the specified project.
OAuth scopes
- environment:write
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_create
- or
- branching_development_create
Path parameters
- refRequiredstring
Project ref
Body
- branch_nameRequiredstring
- git_branchOptionalstring
- is_defaultOptionalboolean
- persistentOptionalboolean
- regionOptionalstring
- desired_instance_sizeOptionalenum
- release_channelOptionalenum
- postgres_engineOptionalenum
- secretsOptionalobject
- with_dataOptionalboolean
- notify_urlOptionalstring
Response codes
- 201
- 401
- 403
- 429
- 500
Delete a database branch
/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).
OAuth scopes
- environment:write
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_delete
- or
- branching_development_delete
Path parameters
- branch_id_or_refRequiredone of the following options
Branch ID
Query parameters
- forceOptionalboolean
If set to false, schedule deletion with 1-hour grace period (only when soft deletion is enabled).
Response codes
- 200
- 500
[Beta] Diffs a database branch
/v1/branches/{branch_id_or_ref}/diffDiffs the specified database branch
OAuth scopes
- environment:write
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_write
- or
- branching_development_write
Path parameters
- branch_id_or_refRequiredone of the following options
Branch ID
Query parameters
- included_schemasOptionalstring
- pgdeltaOptionalboolean
Use pg-delta instead of Migra for diffing when true
Response codes
- 200
- 500
Disables preview branching
/v1/projects/{ref}/branchesDisables preview branching for the specified project
OAuth scopes
- environment:write
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_delete
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Get a database branch
/v1/projects/{ref}/branches/{name}Fetches the specified database branch by its name.
OAuth scopes
- environment:read
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_read
- or
- branching_development_read
Path parameters
- refRequiredstring
Project ref
- nameRequiredstring
Response codes
- 200
- 401
- 403
- 429
- 500
Get database branch config
/v1/branches/{branch_id_or_ref}Fetches configurations of the specified database branch
OAuth scopes
- environment:read
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_read
- or
- branching_development_read
Path parameters
- branch_id_or_refRequiredone of the following options
Branch ID
Response codes
- 200
- 500
Get the status of an action run
/v1/projects/{ref}/actions/{run_id}Returns the current status of the specified action run.
OAuth scopes
- environment:read
The fine-grained token must include the following permissions to access this endpoint:
- action_runs_read
Path parameters
- refRequiredstring
Project ref
- run_idRequiredstring
Action Run ID
Response codes
- 200
- 401
- 403
- 429
- 500
Get the logs of an action run
/v1/projects/{ref}/actions/{run_id}/logsReturns the logs from the specified action run.
OAuth scopes
- environment:read
The fine-grained token must include the following permissions to access this endpoint:
- action_runs_read
Path parameters
- refRequiredstring
Project ref
- run_idRequiredstring
Action Run ID
Response codes
- 200
- 401
- 403
- 429
- 500
List all action runs
/v1/projects/{ref}/actionsReturns a paginated list of action runs of the specified project.
OAuth scopes
- environment:read
The fine-grained token must include the following permissions to access this endpoint:
- action_runs_read
Path parameters
- refRequiredstring
Project ref
Query parameters
- offsetOptionalnumber
- limitOptionalnumber
Response codes
- 200
- 401
- 403
- 429
- 500
List all database branches
/v1/projects/{ref}/branchesReturns all database branches of the specified project.
OAuth scopes
- environment:read
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_read
- or
- branching_development_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Merges a database branch
/v1/branches/{branch_id_or_ref}/mergeMerges the specified database branch
OAuth scopes
- environment:write
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_write
- or
- branching_development_write
Path parameters
- branch_id_or_refRequiredone of the following options
Branch ID
Body
- migration_versionOptionalstring
Response codes
- 201
- 500
Pushes a database branch
/v1/branches/{branch_id_or_ref}/pushPushes the specified database branch
OAuth scopes
- environment:write
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_write
- or
- branching_development_write
Path parameters
- branch_id_or_refRequiredone of the following options
Branch ID
Body
- migration_versionOptionalstring
Response codes
- 201
- 500
Resets a database branch
/v1/branches/{branch_id_or_ref}/resetResets the specified database branch
OAuth scopes
- environment:write
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_write
- or
- branching_development_write
Path parameters
- branch_id_or_refRequiredone of the following options
Branch ID
Body
- migration_versionOptionalstring
Response codes
- 201
- 500
Restore a scheduled branch deletion
/v1/branches/{branch_id_or_ref}/restoreCancels scheduled deletion and restores the branch to active state
OAuth scopes
- environment:write
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_write
- or
- branching_development_write
Path parameters
- branch_id_or_refRequiredone of the following options
Branch ID
Response codes
- 200
- 500
Update database branch config
/v1/branches/{branch_id_or_ref}Updates the configuration of the specified database branch
OAuth scopes
- environment:write
The fine-grained token must include the following permissions to access this endpoint:
- branching_production_write
- or
- branching_development_write
Path parameters
- branch_id_or_refRequiredone of the following options
Branch ID
Body
- branch_nameOptionalstring
- git_branchOptionalstring
- reset_on_pushOptionalDeprecatedboolean
- persistentOptionalboolean
- statusOptionalenum
- request_reviewOptionalboolean
- notify_urlOptionalstring
Response codes
- 200
- 500
Update the status of an action run
/v1/projects/{ref}/actions/{run_id}/statusUpdates the status of an ongoing action run.
OAuth scopes
- environment:write
The fine-grained token must include the following permissions to access this endpoint:
- action_runs_write
Path parameters
- refRequiredstring
Project ref
- run_idRequiredstring
Action Run ID
Body
- cloneOptionalenum
- pullOptionalenum
- healthOptionalenum
- configureOptionalenum
- migrateOptionalenum
- seedOptionalenum
- deployOptionalenum
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Exchange auth code for user's access and refresh token
/v1/oauth/tokenBody
- grant_typeOptionalenum
- client_idOptionalstring
- client_secretOptionalstring
- codeOptionalstring
- code_verifierOptionalstring
- redirect_uriOptionalstring
- refresh_tokenOptionalstring
- resourceOptionalstring
- scopeOptionalstring
Response codes
- 201
[Beta] Revoke oauth app authorization and it's corresponding tokens
/v1/oauth/revokeBody
- client_idRequiredstring
- client_secretRequiredstring
- refresh_tokenRequiredstring
Response codes
- 204
Create an organization
/v1/organizationsThe fine-grained token must include the following permissions to access this endpoint:
- organizations_create
Body
- nameRequiredstring
Response codes
- 201
- 500
Gets information about the organization
/v1/organizations/{slug}OAuth scopes
- organizations:read
The fine-grained token must include the following permissions to access this endpoint:
- organization_admin_read
Path parameters
- slugRequiredstring
Organization slug
Response codes
- 200
- 401
- 403
- 429
List all organizations
/v1/organizationsReturns a list of organizations that you currently belong to.
OAuth scopes
- organizations:read
The fine-grained token must include the following permissions to access this endpoint:
- organizations_read
Response codes
- 200
- 500
List members of an organization
/v1/organizations/{slug}/membersOAuth scopes
- organizations:read
The fine-grained token must include the following permissions to access this endpoint:
- members_read
Path parameters
- slugRequiredstring
Organization slug
Response codes
- 200
Cancels the given project restoration
/v1/projects/{ref}/restore/cancelOAuth scopes
- projects:write
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
Create a project
/v1/projectsOAuth scopes
- projects:write
The fine-grained token must include the following permissions to access this endpoint:
- organization_projects_create
Body
- db_passRequiredstring
- nameRequiredstring
- organization_idOptionalDeprecatedstring
- organization_slugRequiredstring
- planOptionalDeprecatedenum
- regionOptionalDeprecatedenum
- region_selectionOptionalone of the following options
- kps_enabledOptionalDeprecatedboolean
- desired_instance_sizeOptionalenum
- template_urlOptionalstring
- release_channelOptionalDeprecatedenum
- postgres_engineOptionalDeprecatedenum
Response codes
- 201
Deletes the given project
/v1/projects/{ref}OAuth scopes
- projects:write
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
[Beta] Remove network bans.
/v1/projects/{ref}/network-bansOAuth scopes
- projects:write
The fine-grained token must include the following permissions to access this endpoint:
- database_network_bans_write
Path parameters
- refRequiredstring
Project ref
Body
- ipv4_addressesRequiredArray<string>
- requester_ipOptionalboolean
- identifierOptionalstring
Response codes
- 200
- 401
- 403
- 429
- 500
Gets all projects for the given organization
/v1/organizations/{slug}/projectsReturns 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.
The fine-grained token must include the following permissions to access this endpoint:
- organization_projects_read
Path parameters
- slugRequiredstring
Organization slug
Query parameters
- offsetOptionalinteger
Number of projects to skip
- limitOptionalinteger
Number of projects to return per page
- searchOptionalstring
Search projects by name
- sortOptionalenum
Sort order for projects
- statusesOptionalstring
A comma-separated list of project statuses to filter by.
The following values are supported:
ACTIVE_HEALTHY,INACTIVE.
Response codes
- 200
- 500
[Beta] Gets the list of available regions that can be used for a new project
/v1/projects/available-regionsOAuth scopes
- organizations:read
Query parameters
- organization_slugRequiredstring
Slug of your organization
- continentOptionalenum
Continent code to determine regional recommendations: NA (North America), SA (South America), EU (Europe), AF (Africa), AS (Asia), OC (Oceania), AN (Antarctica)
- desired_instance_sizeOptionalenum
Desired instance size
Response codes
- 200
Get database disk attributes
/v1/projects/{ref}/config/diskThe fine-grained token must include the following permissions to access this endpoint:
- infra_disk_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Get disk utilization
/v1/projects/{ref}/config/disk/utilThe fine-grained token must include the following permissions to access this endpoint:
- infra_disk_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Gets project's network restrictions
/v1/projects/{ref}/network-restrictionsOAuth scopes
- projects:read
The fine-grained token must include the following permissions to access this endpoint:
- database_network_restrictions_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Returns the project's eligibility for upgrades
/v1/projects/{ref}/upgrade/eligibilityOAuth scopes
- projects:read
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_read
- database_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Gets the latest status of the project's upgrade
/v1/projects/{ref}/upgrade/statusOAuth scopes
- projects:read
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_read
- database_read
Path parameters
- refRequiredstring
Project ref
Query parameters
- tracking_idOptionalstring
Response codes
- 200
- 401
- 403
- 429
- 500
Gets a specific project that belongs to the authenticated user
/v1/projects/{ref}OAuth scopes
- projects:read
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Gets project disk autoscale config
/v1/projects/{ref}/config/disk/autoscaleThe fine-grained token must include the following permissions to access this endpoint:
- infra_disk_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Gets project's service health status
/v1/projects/{ref}/healthOAuth scopes
- projects:read
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_read
Path parameters
- refRequiredstring
Project ref
Query parameters
- servicesRequiredArray<enum>
- timeout_msOptionalinteger
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Gets project's network bans
/v1/projects/{ref}/network-bans/retrieveOAuth scopes
- projects:read
The fine-grained token must include the following permissions to access this endpoint:
- database_network_bans_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 201
- 401
- 403
- 429
- 500
[Beta] Gets project's network bans with additional information about which databases they affect
/v1/projects/{ref}/network-bans/retrieve/enrichedOAuth scopes
- projects:read
The fine-grained token must include the following permissions to access this endpoint:
- database_network_bans_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 201
- 401
- 403
- 429
- 500
List all projects
/v1/projectsReturns a list of all projects you've previously created.
Use /v1/organizations/{slug}/projects instead when possible to get more precise results and pagination support.
OAuth scopes
- projects:read
The fine-grained token must include the following permissions to access this endpoint:
- projects_read
Response codes
- 200
Lists available restore versions for the given project
/v1/projects/{ref}/restoreOAuth scopes
- projects:read
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
Modify database disk
/v1/projects/{ref}/config/diskThe fine-grained token must include the following permissions to access this endpoint:
- infra_disk_config_write
Path parameters
- refRequiredstring
Project ref
Body
- attributesRequiredone of the following options
Response codes
- 201
- 401
- 403
- 429
- 500
[Alpha] Updates project's network restrictions by adding or removing CIDRs
/v1/projects/{ref}/network-restrictionsOAuth scopes
- projects:write
The fine-grained token must include the following permissions to access this endpoint:
- database_network_restrictions_write
Path parameters
- refRequiredstring
Project ref
Body
- addOptionalobject
- removeOptionalobject
Response codes
- 200
- 401
- 403
- 429
- 500
Pauses the given project
/v1/projects/{ref}/pauseOAuth scopes
- projects:write
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
Restores the given project
/v1/projects/{ref}/restoreOAuth scopes
- projects:write
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
Updates the given project
/v1/projects/{ref}OAuth scopes
- projects:write
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_write
Path parameters
- refRequiredstring
Project ref
Body
- nameRequiredstring
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Updates project's network restrictions
/v1/projects/{ref}/network-restrictions/applyOAuth scopes
- projects:write
The fine-grained token must include the following permissions to access this endpoint:
- database_network_restrictions_write
Path parameters
- refRequiredstring
Project ref
Body
- dbAllowedCidrsOptionalArray<string>
- dbAllowedCidrsV6OptionalArray<string>
Response codes
- 201
- 401
- 403
- 429
- 500
[Beta] Upgrades the project's Postgres version
/v1/projects/{ref}/upgradeOAuth scopes
- projects:write
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_write
- database_write
Path parameters
- refRequiredstring
Project ref
Body
- target_versionRequiredstring
- release_channelOptionalenum
Response codes
- 201
- 401
- 403
- 429
- 500
Gets realtime configuration
/v1/projects/{ref}/config/realtimePath parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
Shutdowns realtime connections for a project
/v1/projects/{ref}/config/realtime/shutdownPath parameters
- refRequiredstring
Project ref
Response codes
- 204
- 401
- 403
- 404
- 429
Updates realtime configuration
/v1/projects/{ref}/config/realtimePath parameters
- refRequiredstring
Project ref
Body
- private_onlyOptionalboolean
- connection_poolOptionalinteger
- max_concurrent_usersOptionalinteger
- max_events_per_secondOptionalinteger
- max_bytes_per_secondOptionalinteger
- max_channels_per_clientOptionalinteger
- max_joins_per_secondOptionalinteger
- max_presence_events_per_secondOptionalinteger
- max_payload_size_in_kbOptionalinteger
- suspendOptionalboolean
Response codes
- 204
- 401
- 403
- 429
Gets project's postgrest config
/v1/projects/{ref}/postgrestOAuth scopes
- rest:read
The fine-grained token must include the following permissions to access this endpoint:
- data_api_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Updates project's postgrest config
/v1/projects/{ref}/postgrestOAuth scopes
- rest:write
The fine-grained token must include the following permissions to access this endpoint:
- data_api_config_write
Path parameters
- refRequiredstring
Project ref
Body
- db_extra_search_pathOptionalstring
- db_schemaOptionalstring
- max_rowsOptionalinteger
- db_poolOptionalinteger
Response codes
- 200
- 401
- 403
- 429
- 500
Bulk create secrets
/v1/projects/{ref}/secretsCreates multiple secrets and adds them to the specified project.
OAuth scopes
- secrets:write
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_secrets_write
Path parameters
- refRequiredstring
Project ref
Body
Response codes
- 201
- 401
- 403
- 429
- 500
Bulk delete secrets
/v1/projects/{ref}/secretsDeletes all secrets with the given names from the specified project
OAuth scopes
- secrets:write
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_secrets_write
Path parameters
- refRequiredstring
Project ref
Body
Response codes
- 200
- 401
- 403
- 429
- 500
Creates a new API key for the project
/v1/projects/{ref}/api-keysOAuth scopes
- secrets:write
The fine-grained token must include the following permissions to access this endpoint:
- api_gateway_keys_write
Path parameters
- refRequiredstring
Project ref
Query parameters
- revealOptionalboolean
Boolean string, true or false
Body
- typeRequiredenum
- nameRequiredstring
- descriptionOptionalstring
- secret_jwt_templateOptionalobject
Response codes
- 201
- 401
- 403
- 429
Deletes an API key for the project
/v1/projects/{ref}/api-keys/{id}OAuth scopes
- secrets:write
The fine-grained token must include the following permissions to access this endpoint:
- api_gateway_keys_write
Path parameters
- refRequiredstring
Project ref
- idRequiredstring
Query parameters
- revealOptionalboolean
Boolean string, true or false
- was_compromisedOptionalboolean
Boolean string, true or false
- reasonOptionalstring
Response codes
- 200
- 401
- 403
- 429
[Beta] Gets project's pgsodium config
/v1/projects/{ref}/pgsodiumOAuth scopes
- secrets:read
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_write
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Get API key
/v1/projects/{ref}/api-keys/{id}OAuth scopes
- secrets:read
The fine-grained token must include the following permissions to access this endpoint:
- api_gateway_keys_read
Path parameters
- refRequiredstring
Project ref
- idRequiredstring
Query parameters
- revealOptionalboolean
Boolean string, true or false
Response codes
- 200
- 401
- 403
- 429
Get project api keys
/v1/projects/{ref}/api-keysOAuth scopes
- secrets:read
The fine-grained token must include the following permissions to access this endpoint:
- api_gateway_keys_read
Path parameters
- refRequiredstring
Project ref
Query parameters
- revealOptionalboolean
Boolean string, true or false
Response codes
- 200
- 401
- 403
- 429
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.
/v1/projects/{ref}/api-keys/legacyOAuth scopes
- secrets:read
The fine-grained token must include the following permissions to access this endpoint:
- api_gateway_keys_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
List all secrets
/v1/projects/{ref}/secretsReturns all secrets you've previously added to the specified project.
OAuth scopes
- secrets:read
The fine-grained token must include the following permissions to access this endpoint:
- edge_functions_secrets_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
[Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.
/v1/projects/{ref}/pgsodiumOAuth scopes
- secrets:write
The fine-grained token must include the following permissions to access this endpoint:
- project_admin_write
Path parameters
- refRequiredstring
Project ref
Body
- root_keyRequiredstring
Response codes
- 200
- 401
- 403
- 429
- 500
Updates an API key for the project
/v1/projects/{ref}/api-keys/{id}OAuth scopes
- secrets:write
The fine-grained token must include the following permissions to access this endpoint:
- api_gateway_keys_write
Path parameters
- refRequiredstring
Project ref
- idRequiredstring
Query parameters
- revealOptionalboolean
Boolean string, true or false
Body
- nameOptionalstring
- descriptionOptionalstring
- secret_jwt_templateOptionalobject
Response codes
- 200
- 401
- 403
- 429
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.
/v1/projects/{ref}/api-keys/legacyOAuth scopes
- secrets:write
The fine-grained token must include the following permissions to access this endpoint:
- api_gateway_keys_write
Path parameters
- refRequiredstring
Project ref
Query parameters
- enabledRequiredboolean
Boolean string, true or false
Response codes
- 200
- 401
- 403
- 429
Gets project's storage config
/v1/projects/{ref}/config/storageThe fine-grained token must include the following permissions to access this endpoint:
- storage_config_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Lists all buckets
/v1/projects/{ref}/storage/bucketsOAuth scopes
- storage:read
The fine-grained token must include the following permissions to access this endpoint:
- storage_read
Path parameters
- refRequiredstring
Project ref
Response codes
- 200
- 401
- 403
- 429
- 500
Updates project's storage config
/v1/projects/{ref}/config/storageThe fine-grained token must include the following permissions to access this endpoint:
- storage_config_write
Path parameters
- refRequiredstring
Project ref
Body
- fileSizeLimitOptionalinteger
- featuresOptionalobject
- externalOptionalobject
Response codes
- 200
- 401
- 403
- 429
- 500