# Neon Documentation ## API Reference - [Neon API for AI Agents](https://api-docs.neon.tech/reference/ai-agents.md): Learn about interfaces for the Neon API for building AI Agents - [Create API key](https://api-docs.neon.tech/reference/createapikey.md): Creates an API key. The `key_name` is a user-specified name for the key. This method returns an `id` and `key`. The `key` is a randomly generated, 64-bit token required to access the Neon API. API keys can also be managed in the Neon Console. See [Manage API keys](https://neon.tech/docs/manage/api-keys/). - [List API keys](https://api-docs.neon.tech/reference/listapikeys.md): Retrieves the API keys for your Neon account. The response does not include API key tokens. A token is only provided when creating an API key. API keys can also be managed in the Neon Console. For more information, see [Manage API keys](https://neon.tech/docs/manage/api-keys/). - [Revoke API key](https://api-docs.neon.tech/reference/revokeapikey.md): Revokes the specified API key. An API key that is no longer needed can be revoked. This action cannot be reversed. You can obtain `key_id` values by listing the API keys for your Neon account. API keys can also be managed in the Neon Console. See [Manage API keys](https://neon.tech/docs/manage/api-keys/). - [API rate limiting](https://api-docs.neon.tech/reference/api-rate-limiting.md) - [Add a OAuth provider](https://api-docs.neon.tech/reference/addbranchneonauthoauthprovider.md): Adds a OAuth provider to the specified project. - [Add domain to redirect_uri whitelist](https://api-docs.neon.tech/reference/addbranchneonauthtrusteddomain.md): Adds a domain to the redirect_uri whitelist for the specified project. - [Create new auth user](https://api-docs.neon.tech/reference/createbranchneonauthnewuser.md): Creates a new user in Neon Auth. - [Enable Neon Auth for the branch](https://api-docs.neon.tech/reference/createneonauth.md): Enables Neon Auth integrationfor the branch. You can obtain the `project_id` and `branch_id` by listing the projects and branches for your Neon account. - [Delete OAuth provider](https://api-docs.neon.tech/reference/deletebranchneonauthoauthprovider.md): Deletes a OAuth provider from the specified project. - [Delete domain from redirect_uri whitelist](https://api-docs.neon.tech/reference/deletebranchneonauthtrusteddomain.md): Deletes a domain from the redirect_uri whitelist for the specified project. - [Delete auth user](https://api-docs.neon.tech/reference/deletebranchneonauthuser.md): Deletes the auth user for the specified project. - [Disables Neon Auth for the branch](https://api-docs.neon.tech/reference/disableneonauth.md) - [Get details of Neon Auth for the branch](https://api-docs.neon.tech/reference/getneonauth.md): / Fetches the details of the Neon Auth for the specified branch. You can obtain the `project_id` and `branch_id` by listing the projects and branches for your Neon account. - [Get allow localhost](https://api-docs.neon.tech/reference/getneonauthallowlocalhost.md): Get the allow localhost configuration for the specified branch. - [Get email and password configuration](https://api-docs.neon.tech/reference/getneonauthemailandpasswordconfig.md): Gets the email and password authentication configuration for Neon Auth - [Get email provider configuration](https://api-docs.neon.tech/reference/getneonauthemailprovider.md): Gets the email provider configuration for the specified branch. - [Get phone number plugin configuration](https://api-docs.neon.tech/reference/getneonauthphonenumberplugin.md): Returns the phone number plugin configuration for Neon Auth. The phone number plugin enables phone-based OTP authentication. - [Get all plugin configurations](https://api-docs.neon.tech/reference/getneonauthpluginconfigs.md): Returns all plugin configurations for Neon Auth in a single response. This endpoint aggregates organization, email provider, email and password, OAuth providers, and localhost settings. - [Get webhook configuration for Neon Auth](https://api-docs.neon.tech/reference/getneonauthwebhookconfig.md): Returns the webhook configuration for Neon Auth. - [List OAuth providers for neon auth for a branch](https://api-docs.neon.tech/reference/listbranchneonauthoauthproviders.md): Lists the OAuth providers for the specified project and branch. - [List domains in redirect_uri whitelist](https://api-docs.neon.tech/reference/listbranchneonauthtrusteddomains.md): Lists the domains in the redirect_uri whitelist for the specified project. - [Send test email](https://api-docs.neon.tech/reference/sendneonauthtestemail.md): Sends a test email to the specified email address. - [Update OAuth provider](https://api-docs.neon.tech/reference/updatebranchneonauthoauthprovider.md): Updates a OAuth provider for the specified project. - [Update allow localhost](https://api-docs.neon.tech/reference/updateneonauthallowlocalhost.md): Updates the allow localhost configuration for the specified branch. - [Update auth configuration](https://api-docs.neon.tech/reference/updateneonauthconfig.md): Updates the auth configuration for the branch. Currently supports updating the application name used in auth emails. - [Update email and password configuration](https://api-docs.neon.tech/reference/updateneonauthemailandpasswordconfig.md): Updates the email and password authentication configuration for Neon Auth - [Update email provider configuration](https://api-docs.neon.tech/reference/updateneonauthemailprovider.md): Updates the email provider configuration for the specified branch. - [Update magic link plugin configuration](https://api-docs.neon.tech/reference/updateneonauthmagiclinkplugin.md): Updates the magic link plugin configuration for Neon Auth. The magic link plugin enables passwordless authentication via email magic links. - [Update organization plugin configuration](https://api-docs.neon.tech/reference/updateneonauthorganizationplugin.md): Updates the organization plugin configuration for Neon Auth. The organization plugin enables multi-tenant organization support. - [Update phone number plugin configuration](https://api-docs.neon.tech/reference/updateneonauthphonenumberplugin.md): Updates the phone number plugin configuration for Neon Auth. The phone number plugin enables phone-based OTP authentication. OTP codes are delivered via the `send.otp` webhook event with `delivery_preference: "sms"`. A webhook must be configured with the `send.otp` event enabled for SMS delivery to work. - [Update auth user role](https://api-docs.neon.tech/reference/updateneonauthuserrole.md): Updates the role of an auth user for the specified project. - [Update webhook configuration for Neon Auth](https://api-docs.neon.tech/reference/updateneonauthwebhookconfig.md): Updates the webhook configuration for Neon Auth on a specific branch. - [Authentication](https://api-docs.neon.tech/reference/authentication.md): Learn how to authenticate Neon API requests - [Retrieve number of branches](https://api-docs.neon.tech/reference/countprojectbranches.md): Retrieves the total number of branches in the specified project. You can obtain a `project_id` by listing the projects for your Neon account. - [Create branch](https://api-docs.neon.tech/reference/createprojectbranch.md): Creates a branch in the specified project. You can obtain a `project_id` by listing the projects for your Neon account. This method does not require a request body, but you can specify one to create a compute endpoint for the branch or to select a non-default parent branch. By default, the branch is created from the project's default branch with no compute endpoint, and the branch name is auto-generated. To access the branch, you must add an endpoint object. A `read_write` endpoint allows you to perform read and write operations on the branch. Each branch supports one read-write endpoint and multiple read-only endpoints. For related information, see [Manage branches](https://neon.tech/docs/manage/branches/). - [Create anonymized branch](https://api-docs.neon.tech/reference/createprojectbranchanonymized.md): Creates a new branch with anonymized data using PostgreSQL Anonymizer for static masking. This allows developers to work with masked production data. Optionally, provide `masking_rules` to set initial masking rules for the branch and `start_anonymization` to automatically start anonymization after creation. This combines functionality of updating masking rules and starting anonymization into the branch creation request. **Note**: This endpoint is currently in Beta. - [Create database](https://api-docs.neon.tech/reference/createprojectbranchdatabase.md): Creates a database in the specified branch. A branch can have multiple databases. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. For related information, see [Manage databases](https://neon.tech/docs/manage/databases/). - [Create role](https://api-docs.neon.tech/reference/createprojectbranchrole.md): Creates a Postgres role in the specified branch. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. For related information, see [Manage roles](https://neon.tech/docs/manage/roles/). Connections established to the active compute endpoint will be dropped. If the compute endpoint is idle, the endpoint becomes active for a short period of time and is suspended afterward. - [Delete branch](https://api-docs.neon.tech/reference/deleteprojectbranch.md): Deletes the specified branch from a project, and places all compute endpoints into an idle state, breaking existing client connections. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain a `branch_id` by listing the project's branches. For related information, see [Manage branches](https://neon.tech/docs/manage/branches/). When a successful response status is received, the compute endpoints are still active, and the branch is not yet deleted from storage. The deletion occurs after all operations finish. You cannot delete a project's root or default branch, and you cannot delete a branch that has a child branch. A project must have at least one branch. - [Delete database](https://api-docs.neon.tech/reference/deleteprojectbranchdatabase.md): Deletes the specified database from the branch. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` and `database_name` by listing the branch's databases. For related information, see [Manage databases](https://neon.tech/docs/manage/databases/). - [Delete role](https://api-docs.neon.tech/reference/deleteprojectbranchrole.md): Deletes the specified Postgres role from the branch. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. You can obtain the `role_name` by listing the roles for a branch. For related information, see [Manage roles](https://neon.tech/docs/manage/roles/). - [Finalize restore](https://api-docs.neon.tech/reference/finalizerestorebranch.md): Finalize the restore operation for a branch created from a snapshot. This operation updates the branch so it functions as the original branch it replaced. This includes: - Reassigning any computes from the original branch to the restored branch (this will restart the computes) - Renaming the restored branch to the original branch's name - Renaming the original branch so it no longer uses the original name This operation only applies to branches created using the `restoreSnapshot` endpoint with `finalize_restore: false`. **Note**: This endpoint is currently in Beta. - [Get anonymized branch status](https://api-docs.neon.tech/reference/getanonymizedbranchstatus.md): Retrieves the current status of an anonymized branch, including its state and progress information. This endpoint allows you to monitor the anonymization process from initialization through completion. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. Only anonymized branches will have status information available. **Note**: This endpoint is currently in Beta. - [Get masking rules](https://api-docs.neon.tech/reference/getmaskingrules.md): Retrieves the masking rules for the specified anonymized branch. Masking rules define how sensitive data should be anonymized using PostgreSQL Anonymizer. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. **Note**: This endpoint is currently in Beta. - [Retrieve branch details](https://api-docs.neon.tech/reference/getprojectbranch.md): Retrieves information about the specified branch. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain a `branch_id` by listing the project's branches. A `branch_id` value has a `br-` prefix. Each Neon project is initially created with a root and default branch named `main`. A project can contain one or more branches. A parent branch is identified by a `parent_id` value, which is the `id` of the parent branch. For related information, see [Manage branches](https://neon.tech/docs/manage/branches/). - [Retrieve database details](https://api-docs.neon.tech/reference/getprojectbranchdatabase.md): Retrieves information about the specified database. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` and `database_name` by listing the branch's databases. For related information, see [Manage databases](https://neon.tech/docs/manage/databases/). - [Retrieve role details](https://api-docs.neon.tech/reference/getprojectbranchrole.md): Retrieves details about the specified role. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. You can obtain the `role_name` by listing the roles for a branch. In Neon, the terms "role" and "user" are synonymous. For related information, see [Manage roles](https://neon.tech/docs/manage/roles/). - [Retrieve role password](https://api-docs.neon.tech/reference/getprojectbranchrolepassword.md): Retrieves the password for the specified Postgres role, if possible. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. You can obtain the `role_name` by listing the roles for a branch. For related information, see [Manage roles](https://neon.tech/docs/manage/roles/). - [Retrieve database schema](https://api-docs.neon.tech/reference/getprojectbranchschema.md): Retrieves the schema from the specified database. The `lsn` and `timestamp` values cannot be specified at the same time. If both are omitted, the database schema is retrieved from database's head. - [Compare database schema](https://api-docs.neon.tech/reference/getprojectbranchschemacomparison.md): Compares the schema from the specified database with another branch's schema. - [List databases](https://api-docs.neon.tech/reference/listprojectbranchdatabases.md): Retrieves a list of databases for the specified branch. A branch can have multiple databases. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. For related information, see [Manage databases](https://neon.tech/docs/manage/databases/). - [List branch endpoints](https://api-docs.neon.tech/reference/listprojectbranchendpoints.md): Retrieves a list of compute endpoints for the specified branch. Neon permits only one read-write compute endpoint per branch. A branch can have multiple read-only compute endpoints. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. - [List branches](https://api-docs.neon.tech/reference/listprojectbranches.md): Retrieves a list of branches for the specified project. You can obtain a `project_id` by listing the projects for your Neon account. Each Neon project has a root branch named `main`. A `branch_id` value has a `br-` prefix. A project may contain child branches that were branched from `main` or from another branch. A parent branch is identified by the `parent_id` value, which is the `id` of the parent branch. For related information, see [Manage branches](https://neon.tech/docs/manage/branches/). - [List roles](https://api-docs.neon.tech/reference/listprojectbranchroles.md): Retrieves a list of Postgres roles from the specified branch. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. For related information, see [Manage roles](https://neon.tech/docs/manage/roles/). - [Reset role password](https://api-docs.neon.tech/reference/resetprojectbranchrolepassword.md): Resets the password for the specified Postgres role. Returns a new password and operations. The new password is ready to use when the last operation finishes. The old password remains valid until last operation finishes. Connections to the compute endpoint are dropped. If idle, the compute endpoint becomes active for a short period of time. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. You can obtain the `role_name` by listing the roles for a branch. For related information, see [Manage roles](https://neon.tech/docs/manage/roles/). - [Restore branch](https://api-docs.neon.tech/reference/restoreprojectbranch.md): Restores a branch to an earlier state in its own or another branch's history - [Set branch as default](https://api-docs.neon.tech/reference/setdefaultprojectbranch.md): Sets the specified branch as the project's default branch. The default designation is automatically removed from the previous default branch. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. For more information, see [Manage branches](https://neon.tech/docs/manage/branches/). - [Start anonymization](https://api-docs.neon.tech/reference/startanonymization.md): Starts the anonymization process for an anonymized branch that is in the initialized, error, or anonymized state. This will apply all defined masking rules to anonymize sensitive data in the branch databases. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. The branch must be an anonymized branch to start anonymization. **Note**: This endpoint is currently in Beta. - [Update masking rules](https://api-docs.neon.tech/reference/updatemaskingrules.md): Updates the masking rules for the specified anonymized branch. Masking rules define how sensitive data should be anonymized using PostgreSQL Anonymizer. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. **Note**: This endpoint is currently in Beta. - [Update branch](https://api-docs.neon.tech/reference/updateprojectbranch.md): Updates the specified branch. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` by listing the project's branches. For more information, see [Manage branches](https://neon.tech/docs/manage/branches/). - [Update database](https://api-docs.neon.tech/reference/updateprojectbranchdatabase.md): Updates the specified database in the branch. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `branch_id` and `database_name` by listing the branch's databases. For related information, see [Manage databases](https://neon.tech/docs/manage/databases/). - [Retrieve account consumption metrics](https://api-docs.neon.tech/reference/getconsumptionhistoryperaccount.md): Retrieves consumption metrics for Scale and Enterprise plan accounts, and for legacy Scale, Business, and Enterprise plan accounts. Consumption history begins at the time the account was upgraded to a supported plan. **Deprecated**: This endpoint will be removed on June 1, 2026. - [Retrieve project consumption metrics](https://api-docs.neon.tech/reference/getconsumptionhistoryperproject.md): Retrieves consumption metrics for Scale, Business, and Enterprise plan projects. History begins at the time of upgrade. Results are ordered by time in ascending order (oldest to newest). Issuing a call to this API does not wake a project's compute endpoint. - [Retrieve project consumption metrics](https://api-docs.neon.tech/reference/getconsumptionhistoryperprojectv2.md): Retrieves consumption metrics for Launch, Scale, Agent, and Enterprise plan projects. History begins at the time of upgrade. Results are ordered by time in ascending order (oldest to newest). Issuing a call to this API does not wake a project's compute endpoint. - [Add domain to redirect_uri whitelist](https://api-docs.neon.tech/reference/addneonauthdomaintoredirecturiwhitelist.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Adds a domain to the redirect_uri whitelist for the specified project. - [Add a OAuth provider](https://api-docs.neon.tech/reference/addneonauthoauthprovider.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers` instead. Adds a OAuth provider to the specified project. - [Create Neon Auth integration](https://api-docs.neon.tech/reference/createneonauthintegration.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth` instead. Creates a project on a third-party authentication provider's platform for use with Neon Auth. Use this endpoint if the frontend integration flow can't be used. - [Create new auth user](https://api-docs.neon.tech/reference/createneonauthnewuser.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/users` instead. Creates a new user in Neon Auth. The user will be created in your neon_auth.users_sync table and automatically propagated to your auth project, whether Neon-managed or provider-owned. - [Create Auth Provider SDK keys](https://api-docs.neon.tech/reference/createneonauthprovidersdkkeys.md): Generates SDK or API Keys for the auth provider. These might be called different things depending on the auth provider you're using, but are generally used for setting up the frontend and backend SDKs. - [Delete domain from redirect_uri whitelist](https://api-docs.neon.tech/reference/deleteneonauthdomainfromredirecturiwhitelist.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Deletes a domain from the redirect_uri whitelist for the specified project. - [Delete integration with auth provider](https://api-docs.neon.tech/reference/deleteneonauthintegration.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth` instead. - [Delete OAuth provider](https://api-docs.neon.tech/reference/deleteneonauthoauthprovider.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}` instead. Deletes a OAuth provider from the specified project. - [Delete auth user](https://api-docs.neon.tech/reference/deleteneonauthuser.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}` instead. Deletes the auth user for the specified project. - [Get email server configuration](https://api-docs.neon.tech/reference/getneonauthemailserver.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/email_provider` instead. Gets the email server configuration for the specified project. - [Lists active integrations with auth providers](https://api-docs.neon.tech/reference/listneonauthintegrations.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth` instead. - [List OAuth providers](https://api-docs.neon.tech/reference/listneonauthoauthproviders.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers` instead. Lists the OAuth providers for the specified project. - [List domains in redirect_uri whitelist](https://api-docs.neon.tech/reference/listneonauthredirecturiwhitelistdomains.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/domains` instead. Lists the domains in the redirect_uri whitelist for the specified project. - [Transfer Neon-managed auth project to your own account](https://api-docs.neon.tech/reference/transferneonauthproviderproject.md): Transfer ownership of your Neon-managed auth project to your own auth provider account. - [Update email server configuration](https://api-docs.neon.tech/reference/updateneonauthemailserver.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/email_provider` instead. Updates the email server configuration for the specified project. - [Update OAuth provider](https://api-docs.neon.tech/reference/updateneonauthoauthprovider.md): DEPRECATED, use `/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}` instead. Updates a OAuth provider for the specified project. - [Create Neon Data API](https://api-docs.neon.tech/reference/createprojectbranchdataapi.md): Creates a new instance of Neon Data API in the specified branch. You can obtain the `project_id` and `branch_id` by listing the projects and branches for your Neon account. - [Delete Neon Data API](https://api-docs.neon.tech/reference/deleteprojectbranchdataapi.md): Deletes the Neon Data API for the specified branch. You can obtain the `project_id` and `branch_id` by listing the projects and branches for your Neon account. - [Get Neon Data API](https://api-docs.neon.tech/reference/getprojectbranchdataapi.md): Retrieves the Neon Data API for the specified branch. - [Update Neon Data API](https://api-docs.neon.tech/reference/updateprojectbranchdataapi.md): Updates the Neon Data API configuration for the specified branch. You can optionally provide settings to update the Data API configuration. The schema cache is always refreshed as part of this operation. You can obtain the `project_id` and `branch_id` by listing the projects and branches for your Neon account. - [Create compute endpoint](https://api-docs.neon.tech/reference/createprojectendpoint.md): Creates a compute endpoint for the specified branch. An endpoint is a Neon compute instance. There is a maximum of one read-write compute endpoint per branch. If the specified branch already has a read-write compute endpoint, the operation fails. A branch can have multiple read-only compute endpoints. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain `branch_id` by listing the project's branches. A `branch_id` has a `br-` prefix. For supported regions and `region_id` values, see [Regions](https://neon.tech/docs/introduction/regions/). For more information about compute endpoints, see [Manage computes](https://neon.tech/docs/manage/endpoints/). - [Delete compute endpoint](https://api-docs.neon.tech/reference/deleteprojectendpoint.md): Delete the specified compute endpoint. A compute endpoint is a Neon compute instance. Deleting a compute endpoint drops existing network connections to the compute endpoint. The deletion is completed when last operation in the chain finishes successfully. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain an `endpoint_id` by listing your project's compute endpoints. An `endpoint_id` has an `ep-` prefix. For information about compute endpoints, see [Manage computes](https://neon.tech/docs/manage/endpoints/). - [Retrieve compute endpoint details](https://api-docs.neon.tech/reference/getprojectendpoint.md): Retrieves information about the specified compute endpoint. A compute endpoint is a Neon compute instance. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain an `endpoint_id` by listing your project's compute endpoints. An `endpoint_id` has an `ep-` prefix. For information about compute endpoints, see [Manage computes](https://neon.tech/docs/manage/endpoints/). - [List compute endpoints](https://api-docs.neon.tech/reference/listprojectendpoints.md): Retrieves a list of compute endpoints for the specified project. A compute endpoint is a Neon compute instance. You can obtain a `project_id` by listing the projects for your Neon account. For information about compute endpoints, see [Manage computes](https://neon.tech/docs/manage/endpoints/). - [Restart compute endpoint](https://api-docs.neon.tech/reference/restartprojectendpoint.md): Restart the specified compute endpoint: suspend immediately followed by start operations. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain an `endpoint_id` by listing your project's compute endpoints. An `endpoint_id` has an `ep-` prefix. For information about compute endpoints, see [Manage computes](https://neon.tech/docs/manage/endpoints/). - [Start compute endpoint](https://api-docs.neon.tech/reference/startprojectendpoint.md): Starts a compute endpoint. The compute endpoint is ready to use after the last operation in chain finishes successfully. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain an `endpoint_id` by listing your project's compute endpoints. An `endpoint_id` has an `ep-` prefix. For information about compute endpoints, see [Manage computes](https://neon.tech/docs/manage/endpoints/). - [Suspend compute endpoint](https://api-docs.neon.tech/reference/suspendprojectendpoint.md): Suspend the specified compute endpoint You can obtain a `project_id` by listing the projects for your Neon account. You can obtain an `endpoint_id` by listing your project's compute endpoints. An `endpoint_id` has an `ep-` prefix. For information about compute endpoints, see [Manage computes](https://neon.tech/docs/manage/endpoints/). - [Update compute endpoint](https://api-docs.neon.tech/reference/updateprojectendpoint.md): Updates the specified compute endpoint. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain an `endpoint_id` and `branch_id` by listing your project's compute endpoints. An `endpoint_id` has an `ep-` prefix. A `branch_id` has a `br-` prefix. For more information about compute endpoints, see [Manage computes](https://neon.tech/docs/manage/endpoints/). If the returned list of operations is not empty, the compute endpoint is not ready to use. The client must wait for the last operation to finish before using the compute endpoint. If the compute endpoint was idle before the update, it becomes active for a short period of time, and the control plane suspends it again after the update. - [Neon API Reference](https://api-docs.neon.tech/reference/getting-started-with-neon-api.md): This page will help you get started with the Neon API - [Retrieve operation details](https://api-docs.neon.tech/reference/getprojectoperation.md): Retrieves details for the specified operation. An operation is an action performed on a Neon project resource. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain a `operation_id` by listing operations for the project. - [List operations](https://api-docs.neon.tech/reference/listprojectoperations.md): Retrieves a list of operations for the specified Neon project. You can obtain a `project_id` by listing the projects for your Neon account. The number of operations returned can be large. To paginate the response, issue an initial request with a `limit` value. Then, add the `cursor` value that was returned in the response to the next request. Operations older than 6 months may be deleted from our systems. If you need more history than that, you should store your own history. - [Assign or update VPC endpoint](https://api-docs.neon.tech/reference/assignorganizationvpcendpoint.md): Assigns a VPC endpoint to a Neon organization or updates its existing assignment. - [Create organization invitations](https://api-docs.neon.tech/reference/createorganizationinvitations.md): Creates invitations for a specific organization. If the invited user has an existing account, they automatically join as a member. If they don't yet have an account, they are invited to create one, after which they become a member. Each invited user receives an email notification. - [Create organization API key](https://api-docs.neon.tech/reference/createorgapikey.md): Creates an API key for the specified organization. The `key_name` is a user-specified name for the key. This method returns an `id` and `key`. The `key` is a randomly generated, 64-bit token required to access the Neon API. API keys can also be managed in the Neon Console. See [Manage API keys](https://neon.tech/docs/manage/api-keys/). - [Delete VPC endpoint](https://api-docs.neon.tech/reference/deleteorganizationvpcendpoint.md): Deletes the VPC endpoint from the specified Neon organization. If you delete a VPC endpoint from a Neon organization, that VPC endpoint cannot be added back to the Neon organization. - [Retrieve organization details](https://api-docs.neon.tech/reference/getorganization.md): Retrieves information about the specified organization. - [Retrieve organization invitation details](https://api-docs.neon.tech/reference/getorganizationinvitations.md): Retrieves information about extended invitations for the specified organization - [Retrieve organization member details](https://api-docs.neon.tech/reference/getorganizationmember.md): Retrieves information about the specified organization member. - [Retrieve organization members details](https://api-docs.neon.tech/reference/getorganizationmembers.md): Retrieves a paginated list of members for the specified organization. - [Retrieve VPC endpoint details](https://api-docs.neon.tech/reference/getorganizationvpcendpointdetails.md): Retrieves the current state and configuration details of a specified VPC endpoint. - [List VPC endpoints](https://api-docs.neon.tech/reference/listorganizationvpcendpoints.md): Retrieves the list of VPC endpoints for the specified Neon organization. - [List VPC endpoints across all regions](https://api-docs.neon.tech/reference/listorganizationvpcendpointsallregions.md): Retrieves the list of VPC endpoints for the specified Neon organization across all regions. - [List organization API keys](https://api-docs.neon.tech/reference/listorgapikeys.md): Retrieves the API keys for the specified organization. The response does not include API key tokens. A token is only provided when creating an API key. API keys can also be managed in the Neon Console. For more information, see [Manage API keys](https://neon.tech/docs/manage/api-keys/). - [Remove member from the organization](https://api-docs.neon.tech/reference/removeorganizationmember.md): Remove member from the organization. Only an admin of the organization can perform this action. If another admin is being removed, it will not be allows in case it is the only admin left in the organization. - [Revoke organization API key](https://api-docs.neon.tech/reference/revokeorgapikey.md): Revokes the specified organization API key. An API key that is no longer needed can be revoked. This action cannot be reversed. You can obtain `key_id` values by listing the API keys for an organization. API keys can also be managed in the Neon Console. See [Manage API keys](https://neon.tech/docs/manage/api-keys/). - [Transfer projects between organizations](https://api-docs.neon.tech/reference/transferprojectsfromorgtoorg.md): Transfers selected projects, identified by their IDs, from your organization to another specified organization. - [Update role for organization member](https://api-docs.neon.tech/reference/updateorganizationmember.md): Only an admin can perform this action. - [Pagination](https://api-docs.neon.tech/reference/pagination.md): How to paginate responses when requesting a list - [Path parameters](https://api-docs.neon.tech/reference/path-parameters.md): How to retrieve Neon API path parameter values - [Accept a project transfer request](https://api-docs.neon.tech/reference/acceptprojecttransferrequest.md): Accepts a transfer request for the specified project, transferring it to the specified organization or user. If org_id is not passed, the project will be transferred to the current user or organization account. - [Add JWKS URL](https://api-docs.neon.tech/reference/addprojectjwks.md): Add a new JWKS URL to a project, such that it can be used for verifying JWTs used as the authentication mechanism for the specified project. The URL must be a valid HTTPS URL that returns a JSON Web Key Set. The `provider_name` field allows you to specify which authentication provider you're using (e.g., Clerk, Auth0, AWS Cognito, etc.). The `branch_id` can be used to specify on which branches the JWKS URL will be accepted. If not specified, then it will work on any branch. The `role_names` can be used to specify for which roles the JWKS URL will be accepted. If not specified, then default roles will be used (authenticator, authenticated and anonymous). The `jwt_audience` can be used to specify which "aud" values should be accepted by Neon in the JWTs that are used for authentication. - [Set VPC endpoint restriction](https://api-docs.neon.tech/reference/assignprojectvpcendpoint.md): Sets or updates a VPC endpoint restriction for a Neon project. When a VPC endpoint restriction is set, the project only accepts connections from the specified VPC. A VPC endpoint can be set as a restriction only after it is assigned to the parent organization of the Neon project. - [Create project](https://api-docs.neon.tech/reference/createproject.md): Creates a Neon project within an organization. You may need to specify an org_id parameter depending on your API key type. Plan limits define how many projects you can create. For more information, see [Manage projects](https://neon.tech/docs/manage/projects/). You can specify a region and Postgres version in the request body. Neon currently supports PostgreSQL 14, 15, 16, and 17. For supported regions and `region_id` values, see [Regions](https://neon.tech/docs/introduction/regions/). - [Create a project transfer request](https://api-docs.neon.tech/reference/createprojecttransferrequest.md): Creates a transfer request for the specified project. A transfer request allows the project to be transferred to another account or organization. The request has an expiration time after which it can no longer be used. To accept/claim the transfer request, the recipient user/organization must call the `/projects/{project_id}/transfer_requests/{request_id}` API endpoint, or visit `https://console.neon.tech/app/claim?p={project_id}&tr={request_id}&ru={redirect_url}` in the Neon Console. The `ru` parameter is optional and can be used to redirect the user after accepting the transfer request. - [Delete project](https://api-docs.neon.tech/reference/deleteproject.md): Deletes the specified project. You can obtain a `project_id` by listing the projects for your Neon account. Deleting a project is a permanent action. Deleting a project also deletes endpoints, branches, databases, and users that belong to the project. - [Delete JWKS URL](https://api-docs.neon.tech/reference/deleteprojectjwks.md): Deletes a JWKS URL from the specified project - [Delete VPC endpoint restriction](https://api-docs.neon.tech/reference/deleteprojectvpcendpoint.md): Removes the specified VPC endpoint restriction from a Neon project. - [Return available shared preload libraries](https://api-docs.neon.tech/reference/getavailablepreloadlibraries.md): Return available shared preload libraries - [Retrieve connection URI](https://api-docs.neon.tech/reference/getconnectionuri.md): Retrieves a connection URI for the specified database. You can obtain a `project_id` by listing the projects for your Neon account. You can obtain the `database_name` by listing the databases for a branch. You can obtain a `role_name` by listing the roles for a branch. - [Retrieve project details](https://api-docs.neon.tech/reference/getproject.md): Retrieves information about the specified project. You can obtain a `project_id` by listing the projects for an organization. - [Get advisor issues](https://api-docs.neon.tech/reference/getprojectadvisorsecurityissues.md): Analyzes the database for security and performance issues. Returns a list of issues categorized by severity (ERROR, WARN, INFO). Requires read access to the project and Data API enabled. - [List JWKS URLs](https://api-docs.neon.tech/reference/getprojectjwks.md): Returns the JWKS URLs available for verifying JWTs used as the authentication mechanism for the specified project. - [Grant project access](https://api-docs.neon.tech/reference/grantpermissiontoproject.md): Grants project access to the account associated with the specified email address - [List project access](https://api-docs.neon.tech/reference/listprojectpermissions.md): Retrieves details about users who have access to the project, including the permission `id`, the granted-to email address, and the date project access was granted. - [List projects](https://api-docs.neon.tech/reference/listprojects.md): Retrieves a list of projects for an organization. You may need to specify an org_id parameter depending on your API key type. For more information, see [Manage projects](https://neon.tech/docs/manage/projects/). - [List VPC endpoint restrictions](https://api-docs.neon.tech/reference/listprojectvpcendpoints.md): Lists VPC endpoint restrictions for the specified Neon project. - [List shared projects](https://api-docs.neon.tech/reference/listsharedprojects.md): Retrieves a list of projects shared with your Neon account. For more information, see [Manage projects](https://neon.tech/docs/manage/projects/). - [Recover a deleted project](https://api-docs.neon.tech/reference/recoverproject.md): Recovers a deleted project during the deletion grace period. You can obtain a `project_id` by listing the projects for your Neon account. - [Restore a deleted project](https://api-docs.neon.tech/reference/restoreproject.md): DEPRECATED, use `/projects/{project_id}/recover` instead. Restores a deleted project during the deletion grace period. You can obtain a `project_id` by listing the projects for your Neon account. - [Revoke project access](https://api-docs.neon.tech/reference/revokepermissionfromproject.md): Revokes project access from the user associated with the specified permission `id`. You can retrieve a user's permission `id` by listing project access. - [Update project](https://api-docs.neon.tech/reference/updateproject.md): Updates the specified project. You can obtain a `project_id` by listing the projects for your Neon account. - [List supported regions](https://api-docs.neon.tech/reference/getactiveregions.md): Lists supported Neon regions. **Note:** Not all regions are available to all organizations. Pass the `org_id` parameter to get an accurate list of regions available to your organization. - [SDKs and providers for the Neon API](https://api-docs.neon.tech/reference/sdks-for-the-neon-api.md) - [Create snapshot](https://api-docs.neon.tech/reference/createsnapshot.md): Create a snapshot from the specified branch using the provided parameters. This endpoint may initiate an asynchronous operation. **Note**: This endpoint is currently in Beta. - [Delete snapshot](https://api-docs.neon.tech/reference/deletesnapshot.md): Delete the specified snapshot. **Note**: This endpoint is currently in Beta. - [View backup schedule](https://api-docs.neon.tech/reference/getsnapshotschedule.md): View the backup schedule for the specified branch. **Note**: This endpoint is currently in Beta. - [List project snapshots](https://api-docs.neon.tech/reference/listsnapshots.md): List the snapshots for the specified project. **Note**: This endpoint is currently in Beta. - [Restore snapshot](https://api-docs.neon.tech/reference/restoresnapshot.md): Restore the specified snapshot to a new branch and optionally finalize the restore operation. **Note**: This endpoint is currently in Beta. - [Update backup schedule](https://api-docs.neon.tech/reference/setsnapshotschedule.md): Update the backup schedule for the specified branch. **Note** : This endpoint is currently in Beta. - [Update snapshot](https://api-docs.neon.tech/reference/updatesnapshot.md): Update the specified snapshot. **Note**: This endpoint is currently in Beta. - [Use cases](https://api-docs.neon.tech/reference/use-cases.md): How you can use the Neon API - [Get request authentication details](https://api-docs.neon.tech/reference/getauthdetails.md): Returns auth information about the passed credentials. It can refer to an API key, Bearer token or OAuth session. - [Retrieve current user details](https://api-docs.neon.tech/reference/getcurrentuserinfo.md): Retrieves information about the current Neon user account. - [Retrieve current user organizations list](https://api-docs.neon.tech/reference/getcurrentuserorganizations.md): Retrieves information about the current Neon user's organizations - [Transfer projects from personal account to organization](https://api-docs.neon.tech/reference/transferprojectsfromusertoorg.md): Transfers selected projects, identified by their IDs, from your personal account to a specified organization.