Neon engineers use Claude Code daily. Here's our personal workflow guide of what works best
/Data API/Troubleshooting

Data API troubleshooting

Common issues and solutions when using the Neon Data API

Beta

Neon Data API is in beta and ready to use. We're actively improving it based on feedback from developers like you. Share your experience in our Discord or via the Neon Console.

Permission denied to create extension "pg_session_jwt"

Request failed: database CREATE permission is required for neon_superuser

Why this happens

You created your database with a direct SQL query (CREATE DATABASE foo;) instead of using the Console UI or Neon API. The Data API requires specific database permissions that aren't automatically granted when you create databases this way.

Fix

Grant neon_superuser permissions to the database you want to enable the Data API for.

GRANT ALL PRIVILEGES ON DATABASE your_database_name TO neon_superuser;

For future databases, create them using the Console UI or Neon API instead of direct SQL. Neon automatically sets up the required permissions when you use these methods.

Example

curl -X POST "https://console.neon.tech/api/v2/projects/${projectId}/branches/${branchId}/databases" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $NEON_API_KEY" \
  -d '{
    "database": {
      "name": "your_database_name"
    }
  }'

Last updated on

Was this page helpful?