Neon is expanding into a backend: Object Storage, Functions, and AI Gateway now in beta
/APIs & SDKs/Projects/Create project
POST/projects

Create project

Creates a Neon project within an organization. If using a personal API key, include the org_id parameter to specify which organization to create the project in. If using an org API key, org_id is automatically inferred from the key. Plan limits define how many projects you can create. For more information, see Manage projects.

You can specify a region and Postgres version in the request body. Neon currently supports PostgreSQL 14, 15, 16, 17, and 18. For supported regions and region_id values, see Regions.

Markdown for AI context

Quick start

REST API - curl
curl "https://console.neon.tech/api/v2/projects" \
  -X POST \
  -H "Authorization: Bearer $NEON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"project":{"name":"my-production-db","region_id":"aws-us-east-2","pg_version":17}}'
Also available in
neon projects create \
  --name my-production-db \
  --pg-version 17 \
  --region-id aws-us-east-2

Request body

Basics

commonly setproject.*
4 fields

Name, location, and Postgres version. The handful most people set.

Project namecommonproject.*
name
stringdefault: auto-generated

The project name. If not specified, the name will be identical to the generated project ID

≥1 chars, ≤256 chars

Region IDcommonproject.*
region_id
string

The region identifier. Refer to our Regions documentation for supported regions. Values are specified in this format: aws-us-east-1

Postgres versioncommonproject.*
pg_version
integerdefault: 17

The major Postgres version number. Generally available versions are 14, 15, 16, 17, and 18. 19 is being rolled out and is only accepted in regions where it has been enabled; requesting it in a region where it is not yet available returns an error.

141516171819

min: 14, max: 19

Organizationcommonproject.*
org_id
stringdefault: personal account

Organization id in case the project created belongs to an organization. If not present, project is owned by a user and not by org.

Compute

project.*
6 fields

Autoscaling range and auto-suspend for the default endpoint.

Branch & database

project.branch.*
4 fields

The default branch and the first role and database created on it.

Project settings

project.*
11 fields

Security, compliance, quotas, retention, and maintenance.

Deprecated

project.*
2 fields

Response

201

Created a project. The project includes a connection URI with a database, password, and role. At least one non-protected role is created with a password. Wait until the operations are finished before attempting to connect to a project database.

Depth

Errors

default

General error

This endpoint can return the standard Neon API error response.

Response fields

  • message Required. Human-readable error message.
  • code Required. Machine-readable error code.
  • request_id Optional. Request identifier for debugging. You can provide one with the X-Request-ID header.

Retry guidance

If no response is returned, the request may still have reached the server. This is why retry safety depends on the method and status code.

Idempotent methods (GET, HEAD, OPTIONS) are generally safe to retry after a network error or timeout. Non-idempotent methods (POST, PATCH, DELETE, PUT) can change state, so avoid automatic retries unless your workflow can tolerate duplicate effects.

Responses with 423 Locked or 503 Service Unavailable are safe to retry. 423 Locked means the resource is temporarily locked, usually because another operation is in progress.

Was this page helpful?

On this page

Copy neon init command