The Neon API is the management API for Neon. Use it to provision, configure, and manage resources such as projects, branches, databases, roles, functions, and object storage.
See the Neon API reference for details, and Manage API keys to create and use API keys.
- Version
- v2
- Base URL
https://console.neon.tech/api/v2
API Key3 operations
These methods allow you to create and manage API keys for your Neon account. For related information, see Manage API keys.
Operation2 operations
These methods allow you to view operation details for your Neon project. For related information, see Operations.
Project24 operations
These methods allow you to create and manage Neon projects. For related information, see Manage projects.
/projectsPOSTCreate project/projectsGETList shared projects/projects/sharedDELETEDelete project/projects/{project_id}GETRetrieve project details/projects/{project_id}PATCHUpdate project/projects/{project_id}GETGet advisor issues/projects/{project_id}/advisorsGETList available shared preload libraries/projects/{project_id}/available_preload_librariesGETRetrieve connection URI/projects/{project_id}/connection_uriGETList JWKS URLs/projects/{project_id}/jwksPOSTAdd JWKS URL/projects/{project_id}/jwksDELETEDelete JWKS URL/projects/{project_id}/jwks/{jwks_id}GETList org members and their project roles/projects/{project_id}/membersDELETERemove an org member's role on a project/projects/{project_id}/members/{member_id}/rolePUTSet an org member's role on a project/projects/{project_id}/members/{member_id}/roleGETList project access/projects/{project_id}/permissionsPOSTGrant project access/projects/{project_id}/permissionsDELETERevoke project access/projects/{project_id}/permissions/{permission_id}POSTRecover a deleted project/projects/{project_id}/recoverPOSTCreate a project transfer request/projects/{project_id}/transfer_requestsPUTAccept a project transfer request/projects/{project_id}/transfer_requests/{request_id}GETList VPC endpoint restrictions/projects/{project_id}/vpc_endpointsDELETEDelete VPC endpoint restriction/projects/{project_id}/vpc_endpoints/{vpc_endpoint_id}POSTSet VPC endpoint restriction/projects/{project_id}/vpc_endpoints/{vpc_endpoint_id}Branch28 operations
These methods allow you to create and manage branches in your Neon project. For related information, see Manage branches.
/projects/{project_id}/branch_anonymizedGETList branches/projects/{project_id}/branchesPOSTCreate branch/projects/{project_id}/branchesGETRetrieve number of branches/projects/{project_id}/branches/countDELETEDelete branch/projects/{project_id}/branches/{branch_id}GETRetrieve branch details/projects/{project_id}/branches/{branch_id}PATCHUpdate branch/projects/{project_id}/branches/{branch_id}POSTStart anonymization/projects/{project_id}/branches/{branch_id}/anonymizeGETRetrieve anonymized branch status/projects/{project_id}/branches/{branch_id}/anonymized_statusGETCompare database schema/projects/{project_id}/branches/{branch_id}/compare_schemaGETList databases/projects/{project_id}/branches/{branch_id}/databasesPOSTCreate database/projects/{project_id}/branches/{branch_id}/databasesDELETEDelete database/projects/{project_id}/branches/{branch_id}/databases/{database_name}GETRetrieve database details/projects/{project_id}/branches/{branch_id}/databases/{database_name}PATCHUpdate database/projects/{project_id}/branches/{branch_id}/databases/{database_name}GETList branch endpoints/projects/{project_id}/branches/{branch_id}/endpointsPOSTFinalize branch restore from snapshot/projects/{project_id}/branches/{branch_id}/finalize_restoreGETRetrieve masking rules/projects/{project_id}/branches/{branch_id}/masking_rulesPATCHUpdate masking rules/projects/{project_id}/branches/{branch_id}/masking_rulesPOSTRestore branch to a historical state/projects/{project_id}/branches/{branch_id}/restoreGETList roles/projects/{project_id}/branches/{branch_id}/rolesPOSTCreate role/projects/{project_id}/branches/{branch_id}/rolesDELETEDelete role/projects/{project_id}/branches/{branch_id}/roles/{role_name}GETRetrieve role details/projects/{project_id}/branches/{branch_id}/roles/{role_name}POSTReset role password/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reset_passwordGETRetrieve role password/projects/{project_id}/branches/{branch_id}/roles/{role_name}/reveal_passwordGETRetrieve database schema/projects/{project_id}/branches/{branch_id}/schemaPOSTSet branch as default/projects/{project_id}/branches/{branch_id}/set_as_defaultEndpoint8 operations
These methods allow you to create and manage compute endpoints in your Neon project. For related information, see Manage compute endpoints.
/projects/{project_id}/endpointsPOSTCreate compute endpoint/projects/{project_id}/endpointsDELETEDelete compute endpoint/projects/{project_id}/endpoints/{endpoint_id}GETRetrieve compute endpoint details/projects/{project_id}/endpoints/{endpoint_id}PATCHUpdate compute endpoint/projects/{project_id}/endpoints/{endpoint_id}POSTRestart compute endpoint/projects/{project_id}/endpoints/{endpoint_id}/restartPOSTStart compute endpoint/projects/{project_id}/endpoints/{endpoint_id}/startPOSTSuspend compute endpoint/projects/{project_id}/endpoints/{endpoint_id}/suspendSnapshot7 operations
These methods allow you to create and manage snapshots.
/projects/{project_id}/branches/{branch_id}/backup_schedulePUTUpdate backup schedule/projects/{project_id}/branches/{branch_id}/backup_schedulePOSTCreate snapshot/projects/{project_id}/branches/{branch_id}/snapshotGETList project snapshots/projects/{project_id}/snapshotsDELETEDelete snapshot/projects/{project_id}/snapshots/{snapshot_id}PATCHUpdate snapshot/projects/{project_id}/snapshots/{snapshot_id}POSTRestore snapshot/projects/{project_id}/snapshots/{snapshot_id}/restoreRegion1 operation
These methods allow you to inspect Neon regions.
Users4 operations
These methods allow you to manage your Neon user account.
Consumption3 operations
These methods allow you to view consumption details for your Neon account.
Organizations19 operations
These methods allow you to manage your Neon organizations.
/organizations/{org_id}GETList organization API keys/organizations/{org_id}/api_keysPOSTCreate organization API key/organizations/{org_id}/api_keysDELETERevoke organization API key/organizations/{org_id}/api_keys/{key_id}DELETERemove organization spending limit/organizations/{org_id}/billing/spending_limitGETRetrieve organization spending limit/organizations/{org_id}/billing/spending_limitPUTSet organization spending limit/organizations/{org_id}/billing/spending_limitGETList organization invitations/organizations/{org_id}/invitationsPOSTCreate organization invitations/organizations/{org_id}/invitationsGETList organization members/organizations/{org_id}/membersDELETERemove organization member/organizations/{org_id}/members/{member_id}GETRetrieve organization member details/organizations/{org_id}/members/{member_id}PATCHUpdate role for organization member/organizations/{org_id}/members/{member_id}GETList VPC endpoints/organizations/{org_id}/vpc/region/{region_id}/vpc_endpointsDELETEDelete VPC endpoint/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}GETRetrieve VPC endpoint details/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}POSTAssign or update VPC endpoint/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}GETList VPC endpoints across all regions/organizations/{org_id}/vpc/vpc_endpointsPOSTTransfer projects between organizations/organizations/{source_org_id}/projects/transferAuth28 operations
These methods allow you to create and manage Neon Auth projects.
/projects/{project_id}/branches/{branch_id}/authGETRetrieve Neon Auth details for the branch/projects/{project_id}/branches/{branch_id}/authPOSTEnable Neon Auth for the branch/projects/{project_id}/branches/{branch_id}/authGETRetrieve localhost allow setting/projects/{project_id}/branches/{branch_id}/auth/allow_localhostPATCHUpdate localhost allow setting/projects/{project_id}/branches/{branch_id}/auth/allow_localhostDELETEDelete domain from redirect_uri whitelist/projects/{project_id}/branches/{branch_id}/auth/domainsGETList domains in redirect_uri whitelist/projects/{project_id}/branches/{branch_id}/auth/domainsPOSTAdd domain to redirect_uri whitelist/projects/{project_id}/branches/{branch_id}/auth/domainsGETRetrieve email and password configuration/projects/{project_id}/branches/{branch_id}/auth/email_and_passwordPATCHUpdate email and password configuration/projects/{project_id}/branches/{branch_id}/auth/email_and_passwordGETRetrieve email provider configuration/projects/{project_id}/branches/{branch_id}/auth/email_providerPATCHUpdate email provider configuration/projects/{project_id}/branches/{branch_id}/auth/email_providerPOSTSend test email using the saved email provider/projects/{project_id}/branches/{branch_id}/auth/email_provider/testGETList OAuth providers for the branch/projects/{project_id}/branches/{branch_id}/auth/oauth_providersPOSTAdd an OAuth provider/projects/{project_id}/branches/{branch_id}/auth/oauth_providersDELETEDelete OAuth provider/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}PATCHUpdate OAuth provider/projects/{project_id}/branches/{branch_id}/auth/oauth_providers/{oauth_provider_id}GETRetrieve Neon Auth plugin configurations/projects/{project_id}/branches/{branch_id}/auth/pluginsPATCHUpdate magic link plugin configuration/projects/{project_id}/branches/{branch_id}/auth/plugins/magic-linkPATCHUpdate organization plugin configuration/projects/{project_id}/branches/{branch_id}/auth/plugins/organizationGETRetrieve phone number plugin configuration/projects/{project_id}/branches/{branch_id}/auth/plugins/phone-numberPATCHUpdate phone number plugin configuration/projects/{project_id}/branches/{branch_id}/auth/plugins/phone-numberPOSTSend test email/projects/{project_id}/branches/{branch_id}/auth/send_test_emailPOSTCreate new auth user/projects/{project_id}/branches/{branch_id}/auth/usersDELETEDelete auth user/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}PUTUpdate auth user role/projects/{project_id}/branches/{branch_id}/auth/users/{auth_user_id}/roleGETRetrieve Neon Auth webhook configuration/projects/{project_id}/branches/{branch_id}/auth/webhooksPUTUpdate Neon Auth webhook configuration/projects/{project_id}/branches/{branch_id}/auth/webhooksAuth (legacy)16 operations
These methods allow you to create and manage Neon Auth projects. Deprecated. See routes with the Auth tag instead.
/projects/auth/createPOSTCreate Auth Provider SDK keys/projects/auth/keysPOSTTransfer Neon-managed auth project to your own account/projects/auth/transfer_ownershipPOSTCreate new auth user/projects/auth/userDELETEDelete trusted redirect URI domain/projects/{project_id}/auth/domainsGETList trusted redirect URI domains/projects/{project_id}/auth/domainsPOSTAdd trusted redirect URI domain/projects/{project_id}/auth/domainsGETRetrieve email server configuration/projects/{project_id}/auth/email_serverPATCHUpdate email server configuration/projects/{project_id}/auth/email_serverDELETEDelete integration with auth provider/projects/{project_id}/auth/integration/{auth_provider}GETList active integrations with auth providers/projects/{project_id}/auth/integrationsGETList OAuth providers/projects/{project_id}/auth/oauth_providersPOSTAdd an OAuth provider/projects/{project_id}/auth/oauth_providersDELETEDelete OAuth provider/projects/{project_id}/auth/oauth_providers/{oauth_provider_id}PATCHUpdate OAuth provider/projects/{project_id}/auth/oauth_providers/{oauth_provider_id}DELETEDelete auth user/projects/{project_id}/auth/users/{auth_user_id}Storage1 operation
These methods allow you to inspect branchable object storage state for Neon branches.
Buckets8 operations
These methods allow you to create and manage branchable object storage buckets and their objects.
/projects/{project_id}/branches/{branch_id}/bucketsPOSTCreate a bucket on the branch/projects/{project_id}/branches/{branch_id}/bucketsDELETEDelete a bucket on the branch/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}GETList objects in a bucket/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objectsDELETEDelete every object under a key prefix (folder) in a bucket/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects-by-prefixDELETEDelete an object in a bucket/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}GETDownload an object's bytes/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/downloadPOSTPresign an upload or download for an object in a bucket/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/presignFunctions13 operations
These methods allow you to create and manage functions on your Neon branches.
/projects/{project_id}/branches/{branch_id}/custom-domainsPOSTRegister a custom domain on a branch/projects/{project_id}/branches/{branch_id}/custom-domainsDELETEDelete a custom domain from a branch/projects/{project_id}/branches/{branch_id}/custom-domains/{domain}GETList functions on the branch/projects/{project_id}/branches/{branch_id}/functionsDELETEDelete a function on the branch/projects/{project_id}/branches/{branch_id}/functions/{slug}GETGet function details/projects/{project_id}/branches/{branch_id}/functions/{slug}PATCHUpdate a function/projects/{project_id}/branches/{branch_id}/functions/{slug}POSTDeploy code to a function/projects/{project_id}/branches/{branch_id}/functions/{slug}/deploymentsGETList triggers on the branch/projects/{project_id}/branches/{branch_id}/triggersPOSTCreate a trigger/projects/{project_id}/branches/{branch_id}/triggersDELETEDelete a trigger/projects/{project_id}/branches/{branch_id}/triggers/{trigger_id}GETGet a trigger/projects/{project_id}/branches/{branch_id}/triggers/{trigger_id}PATCHUpdate a trigger/projects/{project_id}/branches/{branch_id}/triggers/{trigger_id}AI Gateway1 operation
These methods allow you to inspect the AI Gateway endpoint for your Neon branches.
Logs3 operations
These methods allow you to query logs emitted by services running on your Neon branches.
Credentials5 operations
These methods allow you to issue and manage scoped credentials on your Neon branches.
/projects/{project_id}/branches/{branch_id}/credentialsPOSTIssue a scoped credential on the branch/projects/{project_id}/branches/{branch_id}/credentialsDELETERevoke a credential/projects/{project_id}/branches/{branch_id}/credentials/{token_id}POSTReveal a credential's secrets/projects/{project_id}/branches/{branch_id}/credentials/{token_id}/revealPOSTRotate a credential's secrets/projects/{project_id}/branches/{branch_id}/credentials/{token_id}/rotateDataAPI4 operations
/projects/{project_id}/branches/{branch_id}/data-api/{database_name}GETRetrieve Neon Data API configuration/projects/{project_id}/branches/{branch_id}/data-api/{database_name}PATCHUpdate Neon Data API/projects/{project_id}/branches/{branch_id}/data-api/{database_name}POSTCreate Neon Data API/projects/{project_id}/branches/{branch_id}/data-api/{database_name}