Neon's API at https://console.neon.tech/api/v2 manages serverless Postgres projects, branches, and compute endpoints.
Create a token at Account settings → API keys. Send it as Authorization: Bearer <token>. In the examples it's written {{NEON_API_KEY}}.
Full reference: https://api-docs.neon.tech/reference/getting-started-with-neon-api
curl https://console.neon.tech/api/v2/projects \
-H "Authorization: Bearer {{NEON_API_KEY}}"
curl https://console.neon.tech/api/v2/projects/{{PROJECT_ID}}/branches \
-H "Authorization: Bearer {{NEON_API_KEY}}"
A copy-on-write branch of your database, instantly.
curl -X POST https://console.neon.tech/api/v2/projects/{{PROJECT_ID}}/branches \
-H "Authorization: Bearer {{NEON_API_KEY}}" \
-H "Content-Type: application/json" \
-d '{"branch": {"name": "dev-posttaco"}}'