[metadata]
description: Most actions performed in the Neon Console can also be performed using the Neon API. You'll need an API key to validate your requests. Each key is a randomly generated 64 bit token that you must inclu...
og:description: Most actions performed in the Neon Console can also be performed using the Neon API. You'll need an API key to validate your requests. Each key is a randomly generated 64 bit token that you must inclu...
og:image: https://neon.com/docs/og?title=TWFuYWdlIEFQSSBLZXlz&category=TWFuYWdlICYgb3BlcmF0ZQ==
og:site_name: Neon
og:title: Manage API Keys - Neon Docs
og:type: article
og:url: https://neon.com/docs/manage/api-keys
theme-color: #FFFFFF
twitter:card: summary_large_image
twitter:description: Most actions performed in the Neon Console can also be performed using the Neon API. You'll need an API key to validate your requests. Each key is a randomly generated 64 bit token that you must inclu...
twitter:image: https://neon.com/docs/og?title=TWFuYWdlIEFQSSBLZXlz&category=TWFuYWdlICYgb3BlcmF0ZQ==
twitter:site: @neondatabase
twitter:title: Manage API Keys - Neon Docs
viewport: width=device-width, initial-scale=1, viewport-fit=cover

[canonical-links]
https://neon.com/docs/manage/api-keys

[document-links]
/docs
/docs/introduction/branching
AI Gateway: /docs/ai-gateway/overview
AI agents on Neon: /docs/ai/ai-agents-tools
API keys: /docs/manage/api-keys
APIs & SDKs: /docs/reference/api
About: /about-us
Account recovery: /docs/manage/account-recovery
Accounts: /docs/manage/accounts
Active queries: /docs/introduction/monitor-active-queries
Add files to your Postgres branches via Neon Object Storage, our S3-compatible object store: https://neon.com/blog/building-neon-object-storage
Add members by domain: /docs/manage/orgs-add-members-by-domain
Apache Software Foundation: https://www.apache.org
Auth: /docs/auth/overview
Automate pg_dump backups: /docs/manage/backup-pg-dump-automate
Backup & restore: /docs/guides/backup-restore
Backup & restore: /docs/manage/backups
Backup with pg_dump: /docs/manage/backup-pg-dump
Blog: /blog
Branches: /docs/manage/branches
Building on Neon: /docs/guides/platform-integration-overview
CCPA Compliant: https://trust.neon.com/?itemUid=4064ac33-7b48-407b-aed7-ce02971d1ec1
CLI actions: /docs/manage/orgs-cli
California Privacy: https://www.databricks.com/legal/supplemental-privacy-notice-california-residents
Careers: https://www.databricks.com/company/careers/open-positions?department=engineering&location=all&itm_source=www&itm_category=company&itm_page=engineering-at-databricks&itm_location=body&itm_component=hero&itm_offer=open-positions
Changelog: /docs/changelog
Community Guides: /guides
Community: /docs/community/community-intro
Compliance Guide: /docs/security/hipaa
Computes: /docs/manage/computes
Contact Sales: /contact-sales
Data API: /docs/data-api/overview
Database access: /docs/manage/database-access
Databases: /docs/manage/databases
Datadog: /docs/guides/datadog
Discord Server: https://discord.gg/92vNTzKDGp
Discord: https://discord.gg/92vNTzKDGp
Docs: /docs
Edit on GitHub: https://github.com/neondatabase/website/tree/main/content/docs/manage/api-keys.md
Editor access: /docs/manage/user-permissions#per-project-permissions
Examples repo: https://github.com/neondatabase/examples
FAQs: /faqs
GDPR Compliant: https://trust.neon.com/?itemUid=45220873-6e51-4dbb-b1b1-37d66ee9ef95
Get started: /docs/introduction
GitHub: https://github.com/neondatabase/neon
Glossary: /docs/reference/glossary
Grafana Cloud: /docs/guides/grafana-cloud
HIPAA Compliant: /docs/security/hipaa
History window: /docs/introduction/history-window
ISO 27001 Certified: https://trust.neon.com/?itemUid=1fed9faa-4a87-427c-9a95-96b4d6bf66b7
ISO 27701 Certified: https://trust.neon.com/?itemUid=dc79cbc7-c99d-4eb9-891e-f5dc44b943d7
Instant restore: /docs/introduction/branch-restore
Integrations & tooling: /docs/guides/integrations
Integrations: /docs/manage/integrations
Learn PostgreSQL: https://neon.com/postgresql/tutorial
LinkedIn: https://www.linkedin.com/company/neon-inc/
Log in: https://console.neon.tech/login
Logs: /docs/introduction/monitor-logs
Manage & operate: /docs/manage/platform
Manage Organizations: /docs/manage/orgs-manage
Manage organizations via API: /docs/manage/orgs-api
Metrics & logs: /docs/reference/metrics-logs
Modern Slavery Statement: https://www.databricks.com/legal/modern-slavery-policy-statement
Monitoring dashboard: /docs/introduction/monitoring-page
Multitenancy: /docs/guides/multitenancy
Neon API Reference: /docs/reference/api
Neon API Reference: /docs/reference/api/api-keys/create-api-key
Neon API: /docs/reference/api
Neon Console: https://console.neon.tech
Neon Functions: /docs/compute/functions/overview
Neon Platform Terms: /platform-terms
Neon status loading...: https://neonstatus.com/
Neon: /
Neon’s Sub Contractors: /hipaa-contractors
Next Account recovery: /docs/manage/account-recovery
Object Storage: /docs/storage/overview
Object hierarchy: /docs/manage/overview
OpenTelemetry: /docs/guides/opentelemetry
Organization API Keys: /docs/manage/orgs-api#api-keys
Organizations: /docs/manage/organizations
Overview: /docs/introduction/monitoring
Overview: /docs/manage/backups
Overview: /docs/manage/maintenance-updates-overview
Overview: /docs/manage/organizations
Part 1 - Create an S3 bucket: /docs/manage/backups-aws-s3-backup-part-1
Part 2 - Automate nightly backups: /docs/manage/backups-aws-s3-backup-part-2
Permissions quickstart: /docs/manage/project-permissions-get-started
PgHero: /docs/introduction/monitor-pghero
Plans & billing: /docs/introduction/about-billing
Platform maintenance: /docs/manage/platform-maintenance
PostgreSQL Tutorial: /postgresql/tutorial
Postgres: /docs/postgres/overview
Previous Database access: /docs/manage/database-access
Privacy Notice: https://www.databricks.com/legal/privacynotice
Production checklist: /docs/get-started/production-checklist
Project collaboration: /docs/guides/project-collaboration-guide
Projects: /docs/manage/projects
Query organization metrics via API: /docs/manage/orgs-api-consumption
Query performance: /docs/introduction/monitor-query-performance
RSS feeds: /docs/reference/feeds
Regions: /docs/introduction/regions
Reset a password: /docs/manage/roles#reset-a-password
Resilience & architecture: /docs/introduction/architecture-overview
Retrieve project details: /docs/reference/api/projects/get-project
Roadmap: /docs/introduction/roadmap
Roles: /docs/manage/roles
SOC 2 Certified: https://trust.neon.com/?itemUid=7bfa66da-33ab-49de-8391-e329738a1ae9
Security & compliance: /docs/security/security-overview
Security: /security
Sign up: https://console.neon.tech/signup
Startups: /startups
Status: /docs/introduction/status
Support: /docs/introduction/support
System operations: /docs/manage/operations
Tables: /docs/guides/tables
Terms of Use: https://www.databricks.com/legal/terms-of-use
Transfer projects: /docs/manage/orgs-project-transfer
Trust Center: https://trust.neon.com
Updates: /docs/manage/updates
User permissions: /docs/manage/user-permissions
Watch the video: /docs/introduction/branching
X.com: https://twitter.com/neondatabase/
YouTube: https://www.youtube.com/channel/UCoMzQTJSIr7-RU1QbomQI2w
https://discord.gg/92vNTzKDGp
https://github.com/neondatabase/neon
https://neon.com/docs/llms.txt: https://neon.com/docs/llms.txt
jq: https://stedolan.github.io/jq/
pgAdmin: /docs/introduction/monitor-pgadmin

[structured-data]
{"@context":"https://schema.org","@type":"Article","author":{"@type":"Organization","name":"Neon"},"headline":"Manage API Keys"}

[content]
Manage API Keys - Neon Docs
Add files to your Postgres branches via Neon Object Storage, our S3-compatible object store
Neon
Docs
Search
...
⌘K
Ask AI
Log in
Sign up
Get started
Products
Postgres
Auth
Data API
Neon Functions
Object Storage
AI Gateway
Platform
Manage & operate
Resilience & architecture
Security & compliance
Plans & billing
Building on Neon
AI agents on Neon
Reference
APIs & SDKs
Integrations & tooling
Glossary
Resources
Support & Community
Support
Community
Product updates
Status
Changelog
Roadmap
RSS feeds
Starter code
Examples repo
Learn PostgreSQL
Search
...
⌘K
Ask AI
Full Neon documentation index:
https://neon.com/docs/llms.txt
Manage & operate
Access & collaboration
Accounts
Permissions quickstart
User permissions
Organizations
Overview
Manage Organizations
Add members by domain
Transfer projects
Organizations API
Manage organizations via API
Query organization metrics via API
CLI
CLI actions
Project collaboration
Database access
API keys
Account recovery
Projects & resources
Object hierarchy
Projects
Multitenancy
Branches
Computes
Roles
Databases
Tables
Integrations
Monitoring & observability
Overview
Metrics & logs
Monitoring dashboard
System operations
Active queries
Query performance
Logs
Third-party monitoring
Datadog
Grafana Cloud
OpenTelemetry
pgAdmin
PgHero
Operations & maintenance
Production checklist
Backup & restore
Backup & restore
History window
Instant restore
Overview
Backup with pg_dump
Automate pg_dump backups
Part 1 - Create an S3 bucket
Part 2 - Automate nightly backups
Updates
Overview
Platform maintenance
Updates
Regions
/
Manage & operate
/
API keys
Manage API Keys
Copy page
Most actions performed in the Neon Console can also be performed using the
Neon API
. You'll need an API key to validate your requests. Each key is a randomly-generated 64-bit token that you must include when calling Neon API methods. All keys remain valid until deliberately revoked.
Types of API keys
Neon supports three types of API keys:
Key Type
Who Can Create
Scope
Validity
Personal API Key
Any user
All organization projects where the user is a member
Valid until revoked; org project access ends if user leaves organization
Organization API Key
Organization administrators
All projects within the organization
Valid until revoked
Project-scoped API Key
Organization administrators
Single specified project
Valid until revoked or project leaves organization
Only organization
Admins
can create organization or project-scoped keys. If you're an Editor, Viewer, or Collaborator, create a personal API key instead; it's scoped to your own access. See
User permissions
for what each role can do.
While there is no strict limit on the number of API keys you can create, we recommend keeping it under 10,000 per Neon account.
Creating API keys
You create and manage API keys in the
Neon Console
, and where you go depends on the key type:
Personal keys:
open the user menu and select
Account settings
>
API keys
.
Organization and project-scoped keys:
switch to your organization, then go to
Settings
>
API keys
.
Each page lists your existing keys with their name, ID, and creation details, plus a button to create a new key. You'll need to create your first API key from the Console, where you are already authenticated. You can then use that key to generate new keys from the API.
When creating API keys from the Neon Console, the secret token will be displayed only once. Copy it immediately and store it securely in a credential manager (like AWS Key Management Service or Azure Key Vault); you won't be able to retrieve it later. If you lose an API key, you'll need to revoke it and create a new one.
important
You are responsible for maintaining the records and associations of any API keys in your environment and systems.
Create a personal API key
You can create a personal API key in the Neon Console, with the Neon CLI, or using the Neon API.
Console
CLI
API
In the Neon Console, select
Account settings
>
API keys
. You'll see a list of any existing keys, along with the button to create a new key.
Create an organization API key
Organization API keys provide admin-level access to all organization resources. Only organization admins can create these keys. To create an organization API key, you must use your personal API key and be an administrator in the organization. Neon will verify your admin status before allowing the key creation.
For more detail about organization-related methods, see
Organization API Keys
.
Console
CLI
API
Navigate to your organization's
Settings
>
API keys
to view a list of existing keys and the button to create a new key.
Create project-scoped organization API keys
Project-scoped API keys have
Editor
access
on their project, meaning they can read and modify project resources but
cannot
delete the project or manage who can access it. These keys:
Can only access and manage the specified project
Cannot perform organization-related actions or create new projects
Will stop working if the project is transferred out of the organization
Console
CLI
API
In your organization's
Settings
>
API keys
, click
Create new
and select
Project-scoped
to create a key for your chosen project.
Make an API call
The following example demonstrates how to use your API key to retrieve projects:
curl
'https://console.neon.tech/api/v2/projects'
\
-H
'Accept: application/json'
\
-H
"Authorization: Bearer $NEON_API_KEY"
|
jq
where:
"https://console.neon.tech/api/v2/projects"
is the resource URL, which includes the base URL for the Neon API and the
/projects
endpoint.
The
"Accept: application/json"
in the header specifies the accepted response type.
The
Authorization: Bearer $NEON_API_KEY
entry in the header specifies your API key. Replace
$NEON_API_KEY
with an actual 64-bit API key. A request without this header, or containing an invalid or revoked API key, fails and returns a
401 Unauthorized
HTTP status code.
jq
is an optional third-party tool that formats the JSON response, making it easier to read.
Response body
For attribute definitions, find the
Retrieve project details
endpoint in the
Neon API Reference
. Definitions are provided in the
Responses
section.
{
"projects"
:
[
{
"cpu_used_sec"
:
0
,
"id"
:
"purple-shape-411361"
,
"platform_id"
:
"aws"
,
"region_id"
:
"aws-us-east-2"
,
"name"
:
"purple-shape-411361"
,
"provisioner"
:
"k8s-pod"
,
"pg_version"
:
15
,
"locked"
:
false
,
"created_at"
:
"2023-01-03T18:22:56Z"
,
"updated_at"
:
"2023-01-03T18:22:56Z"
,
"proxy_host"
:
"us-east-2.aws.neon.tech"
,
"branch_logical_size_limit"
:
3072
}
]
}
Refer to the
Neon API Reference
for other supported Neon API methods.
List API keys
Console
API
Navigate to
Account settings
>
API keys
to view your personal API keys, or your organization's
Settings
>
API keys
to view organization API keys.
Revoke API Keys
You should revoke API keys that are no longer needed or if you suspect a key may have been compromised. Key details:
The action is immediate and permanent
All API requests using the revoked key will fail with a 401 Unauthorized error
The key cannot be reactivated; you'll need to create a new key if access is needed again
Who can revoke keys
Personal API keys can only be revoked by the account owner
Organization API keys can be revoked by organization admins
Project-scoped keys can be revoked by organization admins
Console
API
In the Neon Console, navigate to
Account settings
>
API keys
and click
Revoke
next to the key you want to revoke. The key will be immediately revoked. Any request that uses this key will now fail.
Rotate an API key
Neon API keys don't expire or rotate on a schedule, so you rotate one manually. Because revocation is immediate, create the replacement first to avoid downtime:
Create a new key with the same scope as the old one (see
Creating API keys
).
Update every caller that uses the old key, such as CI secrets, Terraform variables, serverless functions, the Neon CLI, and any MCP server configuration.
Revoke the old key once nothing depends on it.
If you're rotating because a key was exposed, revoke the compromised key first, then create and roll out its replacement. For rotating Postgres passwords alongside API keys, see
Reset a password
.
Need help?
Join our
Discord Server
to ask questions or see what others are doing with Neon. For paid plan support options, see
Support
.
To view the API documentation for this method, refer to the
Neon API Reference
.
Was this page helpful?
Yes
No
Thank you for your feedback!
Edit on GitHub
Previous
Database access
Next
Account recovery
On this page
Types of API keys
Creating API keys
Make an API call
List API keys
Revoke API Keys
Rotate an API key
Need help?
Set up Neon with AI
Copy neon init command
Watch: Git for databases
See how Neon branching works in practice.
Watch the video
Neon Docs
Neon
Neon is part of the Databricks Platform
Neon status loading...
© Neon 2026. All rights reserved. Apache, Apache Spark, Spark, the Spark Logo, Apache Iceberg, Iceberg, and the Apache Iceberg logo are trademarks of the
Apache Software Foundation
.
Privacy Notice
Terms of Use
Neon Platform Terms
Modern Slavery Statement
California Privacy
Company
About
Blog
Careers
Contact Sales
Security
Resources
Docs
Changelog
Support
Community Guides
FAQs
PostgreSQL Tutorial
Startups
Community
Discord
GitHub
X.com
LinkedIn
YouTube
Compliance
CCPA
Compliant
GDPR
Compliant
ISO 27001
Certified
ISO 27701
Certified
SOC 2
Certified
HIPAA
Compliant
Compliance Guide
Neon’s Sub Contractors
Trust Center
