GET/projects

List projects

Retrieves a list of projects for the specified organization. If using a personal API key, include the org_id parameter to specify which organization to work with. If using an org API key, org_id is automatically inferred from the key. For more information, see Manage organizations using the Neon API and Manage projects.

6 parameters
cursorstringoptional
Specify the cursor value from the previous response to retrieve the next batch of projects.
limitintegeroptional
Specify a value from 1 to 400 to limit number of projects in the response.
Default:10
searchstringoptional
Search by project `name` or `id`. You can specify partial `name` or `id` values to filter results.
org_idstringoptional
Search for projects by `org_id`.
timeoutintegeroptional
Specify an explicit timeout in milliseconds to limit response delay. After timing out, the incomplete list of project data fetched so far will be returned. Projects still being fetched when the timeout occurred are listed in the "unavailable" attribute of the response. If not specified, an implicit implementation defined timeout is chosen with the same behaviour as above
recoverablebooleanoptional
Show only deleted projects within the recovery window.
Default:false

2 status codes
200Returned a list of projects for the Neon account
projectsarray<object>required
List of projects accessible to the caller. Projects that exist but could not be retrieved are identified in `unavailable_project_ids`.
unavailable_project_idsarray<string>optional
A list of project IDs indicating which projects are known to exist, but whose details could not be fetched within the requested (or implicit) time limit
paginationobjectoptional
Cursor-based pagination. The `cursor` value reflects the endpoint's sort field (for example, an ID or timestamp), so pass it back unchanged.
applicationsobjectrequired
Map of project IDs to their installed applications. Each key is a project ID; each value is an array of application types (for example, `vercel`, `github`).
integrationsobjectrequired
Map of project IDs to their associated integration details.
defaultGeneral Error. The request may or may not be safe to retry, depending on the HTTP method, response status code, and whether a response was received. - If no response is returned from the API, a network error or timeout likely occurred. - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. Any request that returns a `503 Service Unavailable` response is always safe to retry. Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress.
request_idstringoptional
Unique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
codestringrequired
Machine-readable code classifying the error type. See `message` for a human-readable explanation.
Default:
messagestringrequired
Error message

Error handling

Any other status is an error: General Error.

The request may or may not be safe to retry, depending on the HTTP method, response status code, and whether a response was received.

  • If no response is returned from the API, a network error or timeout likely occurred.
  • In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results.

The following HTTP methods are considered non-idempotent: POST, PATCH, DELETE, and PUT. Retrying these methods is generally not safe. The following methods are considered idempotent: GET, HEAD, and OPTIONS. Retrying these methods is safe in the event of a network error or timeout.

Any request that returns a 503 Service Unavailable response is always safe to retry.

Any request that returns a 423 Locked response is safe to retry. 423 Locked indicates that the resource is temporarily locked, for example, due to another operation in progress.