# Neon

Manage Neon Postgres: projects, branches, databases, endpoints, roles. Exposes **33 actions** covering the API surface an agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `neon_projects_list` | List projects - GET /projects. |
| `neon_project_get` | Get one project - GET /projects/&#123;project_id&#125;. |
| `neon_project_create` | Create a new project - POST /projects. |
| `neon_project_update` | Update a project - PATCH /projects/&#123;project_id&#125;. |
| `neon_project_delete` | Delete a project - DELETE /projects/&#123;project_id&#125;. |
| `neon_branches_list` | List branches in a project - GET /projects/&#123;project_id&#125;/branches. |
| `neon_branch_get` | Get one branch - GET /projects/&#123;project_id&#125;/branches/&#123;branch_id&#125;. |
| `neon_branch_create` | Create a new branch - POST /projects/&#123;project_id&#125;/branches. |
| `neon_branch_update` | Update a branch - PATCH /projects/&#123;project_id&#125;/branches/&#123;branch_id&#125;. |
| `neon_branch_delete` | Delete a branch - DELETE /projects/&#123;project_id&#125;/branches/&#123;branch_id&#125;. |
| `neon_databases_list` | List databases in a project - GET /projects/&#123;project_id&#125;/databases. |
| `neon_database_get` | Get one database - GET /projects/&#123;project_id&#125;/databases/&#123;database_name&#125;. |
| `neon_database_create` | Create a new database - POST /projects/&#123;project_id&#125;/databases. |
| `neon_database_delete` | Delete a database - DELETE /projects/&#123;project_id&#125;/databases/&#123;database_name&#125;. |
| `neon_endpoints_list` | List endpoints (compute instances) - GET /projects/&#123;project_id&#125;/endpoints. |
| `neon_endpoint_get` | Get one endpoint - GET /projects/&#123;project_id&#125;/endpoints/&#123;endpoint_id&#125;. |
| `neon_endpoint_create` | Create a new endpoint - POST /projects/&#123;project_id&#125;/endpoints. |
| `neon_endpoint_update` | Update an endpoint - PATCH /projects/&#123;project_id&#125;/endpoints/&#123;endpoint_id&#125;. |
| `neon_endpoint_delete` | Delete an endpoint - DELETE /projects/&#123;project_id&#125;/endpoints/&#123;endpoint_id&#125;. |
| `neon_endpoint_start` | Start an endpoint - POST /projects/&#123;project_id&#125;/endpoints/&#123;endpoint_id&#125;/start. |
| `neon_endpoint_suspend` | Suspend an endpoint - POST /projects/&#123;project_id&#125;/endpoints/&#123;endpoint_id&#125;/suspend. |
| `neon_roles_list` | List roles - GET /projects/&#123;project_id&#125;/roles. |
| `neon_role_get` | Get one role - GET /projects/&#123;project_id&#125;/roles/&#123;role_name&#125;. |
| `neon_role_create` | Create a new role - POST /projects/&#123;project_id&#125;/roles. |
| `neon_role_reset_password` | Reset a role's password - POST /projects/&#123;project_id&#125;/roles/&#123;role_name&#125;/reset_password. |
| `neon_role_delete` | Delete a role - DELETE /projects/&#123;project_id&#125;/roles/&#123;role_name&#125;. |
| `neon_operations_list` | List operations in a project - GET /projects/&#123;project_id&#125;/operations. |
| `neon_operation_get` | Get one operation - GET /projects/&#123;project_id&#125;/operations/&#123;operation_id&#125;. |
| `neon_consumption_get` | Get project consumption metrics - GET /projects/&#123;project_id&#125;/consumption. |
| `neon_api_keys_list` | List API keys - GET /api_keys. |
| `neon_api_key_get` | Get one API key - GET /api_keys/&#123;key_id&#125;. |
| `neon_api_key_create` | Create a new API key - POST /api_keys. |
| `neon_api_key_delete` | Delete an API key - DELETE /api_keys/&#123;key_id&#125;. |

## How to get credentials

This connector uses an **API key / token**. Create one in the provider
dashboard, then paste it into FlyMyAI:

- **`NEON_API_KEY`** - Neon Console - Account settings - API keys. (https://console.neon.tech/app/settings/api-keys)

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `NEON_API_KEY` | Neon Console - Account settings - API keys. |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the token is wrong, expired, or missing a required scope; regenerate it.
- **`429 Too Many Requests`** - provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [Neon API documentation](https://api-docs.neon.tech)
