Neon Auth API

Manage Neon Auth configuration for branches, including OAuth providers, webhooks, and authentication settings.

Operations 6

GET /projects/{project_id}/branches/{branch_id}/auth Get Auth configuration #
PUT /projects/{project_id}/branches/{branch_id}/auth Update Auth configuration #
GET /projects/{project_id}/branches/{branch_id}/auth/providers List OAuth providers #
POST /projects/{project_id}/branches/{branch_id}/auth/providers Create an OAuth provider #
PATCH /projects/{project_id}/branches/{branch_id}/auth/providers/{provider_id} Update an OAuth provider #
DELETE /projects/{project_id}/branches/{branch_id}/auth/providers/{provider_id} Delete an OAuth provider #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/neon-auth-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

neon-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Neon Management API Keys Auth API
  description: The Neon Management API is a RESTful interface for programmatically managing Neon serverless Postgres resources. It allows developers to create and manage projects, branches, databases, roles, compute endpoints, and operations. The API supports everything available through the Neon Console, enabling automation of database infrastructure workflows. An OpenAPI 3.0 specification is available along with TypeScript, Python, and Go SDKs.
  version: '2.0'
  contact:
    name: Neon Support
    url: https://neon.com/docs/introduction/support
  termsOfService: https://neon.com/terms-of-service
servers:
- url: https://console.neon.tech/api/v2
  description: Neon Production API
security:
- bearerAuth: []
tags:
- name: Auth
  description: Manage Neon Auth configuration for branches, including OAuth providers, webhooks, and authentication settings.
paths:
  /projects/{project_id}/branches/{branch_id}/auth:
    get:
      operationId: getProjectBranchAuth
      summary: Get Auth configuration
      description: Retrieves the Neon Auth configuration for the specified branch, including whether Auth is enabled, the Auth URL, and OAuth provider settings.
      tags:
      - Auth
      parameters:
      - $ref: '#/components/parameters/projectIdParam'
      - $ref: '#/components/parameters/branchIdParam'
      responses:
        '200':
          description: Successfully retrieved Auth configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    $ref: '#/components/schemas/AuthConfig'
        '401':
          description: Unauthorized
        '404':
          description: Branch not found
    put:
      operationId: updateProjectBranchAuth
      summary: Update Auth configuration
      description: Updates the Neon Auth configuration for the specified branch, including enabling or disabling Auth and configuring settings.
      tags:
      - Auth
      parameters:
      - $ref: '#/components/parameters/projectIdParam'
      - $ref: '#/components/parameters/branchIdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthConfigUpdate'
      responses:
        '200':
          description: Auth configuration updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    $ref: '#/components/schemas/AuthConfig'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Branch not found
  /projects/{project_id}/branches/{branch_id}/auth/providers:
    get:
      operationId: listNeonAuthOAuthProviders
      summary: List OAuth providers
      description: Retrieves a list of configured OAuth providers for Neon Auth on the specified branch.
      tags:
      - Auth
      parameters:
      - $ref: '#/components/parameters/projectIdParam'
      - $ref: '#/components/parameters/branchIdParam'
      responses:
        '200':
          description: Successfully retrieved list of OAuth providers
          content:
            application/json:
              schema:
                type: object
                properties:
                  providers:
                    type: array
                    items:
                      $ref: '#/components/schemas/OAuthProvider'
        '401':
          description: Unauthorized
        '404':
          description: Branch not found
    post:
      operationId: createNeonAuthOAuthProvider
      summary: Create an OAuth provider
      description: Configures a new OAuth provider for Neon Auth on the specified branch.
      tags:
      - Auth
      parameters:
      - $ref: '#/components/parameters/projectIdParam'
      - $ref: '#/components/parameters/branchIdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuthProviderCreateRequest'
      responses:
        '201':
          description: OAuth provider created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  provider:
                    $ref: '#/components/schemas/OAuthProvider'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Branch not found
  /projects/{project_id}/branches/{branch_id}/auth/providers/{provider_id}:
    patch:
      operationId: updateNeonAuthOAuthProvider
      summary: Update an OAuth provider
      description: Updates the configuration for the specified OAuth provider.
      tags:
      - Auth
      parameters:
      - $ref: '#/components/parameters/projectIdParam'
      - $ref: '#/components/parameters/branchIdParam'
      - name: provider_id
        in: path
        required: true
        description: The OAuth provider ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuthProviderUpdateRequest'
      responses:
        '200':
          description: OAuth provider updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  provider:
                    $ref: '#/components/schemas/OAuthProvider'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: OAuth provider not found
    delete:
      operationId: deleteNeonAuthOAuthProvider
      summary: Delete an OAuth provider
      description: Removes the specified OAuth provider from Neon Auth configuration.
      tags:
      - Auth
      parameters:
      - $ref: '#/components/parameters/projectIdParam'
      - $ref: '#/components/parameters/branchIdParam'
      - name: provider_id
        in: path
        required: true
        description: The OAuth provider ID
        schema:
          type: string
      responses:
        '200':
          description: OAuth provider deleted successfully
        '401':
          description: Unauthorized
        '404':
          description: OAuth provider not found
components:
  schemas:
    AuthConfigUpdate:
      type: object
      description: Request body for updating Auth configuration
      properties:
        enabled:
          type: boolean
          description: Whether to enable or disable Neon Auth
    OAuthProvider:
      type: object
      description: An OAuth provider configuration for Neon Auth
      properties:
        id:
          type: string
          description: The OAuth provider ID
        provider:
          type: string
          description: The OAuth provider type (e.g., google, github, discord)
        client_id:
          type: string
          description: The OAuth client ID
        enabled:
          type: boolean
          description: Whether this provider is enabled
        created_at:
          type: string
          format: date-time
          description: Provider creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
    AuthConfig:
      type: object
      description: Neon Auth configuration for a branch, providing managed authentication built on Better Auth.
      properties:
        enabled:
          type: boolean
          description: Whether Neon Auth is enabled for this branch
        auth_url:
          type: string
          format: uri
          description: The URL for the Neon Auth service
        jwks_url:
          type: string
          format: uri
          description: The JWKS URL for JWT validation
        schema:
          type: string
          description: The database schema used by Neon Auth (typically neon_auth)
    OAuthProviderUpdateRequest:
      type: object
      description: Request body for updating an OAuth provider
      properties:
        client_id:
          type: string
          description: The OAuth client ID
        client_secret:
          type: string
          description: The OAuth client secret
        enabled:
          type: boolean
          description: Whether this provider is enabled
    OAuthProviderCreateRequest:
      type: object
      description: Request body for creating a new OAuth provider
      required:
      - provider
      - client_id
      - client_secret
      properties:
        provider:
          type: string
          description: The OAuth provider type
        client_id:
          type: string
          description: The OAuth client ID
        client_secret:
          type: string
          description: The OAuth client secret
        enabled:
          type: boolean
          description: Whether to enable this provider
          default: true
  parameters:
    branchIdParam:
      name: branch_id
      in: path
      required: true
      description: The branch ID
      schema:
        type: string
    projectIdParam:
      name: project_id
      in: path
      required: true
      description: The Neon project ID
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Neon API keys are used to authenticate requests. Include the API key in the Authorization header as a Bearer token.
externalDocs:
  description: Neon API Documentation
  url: https://neon.com/docs/reference/api-reference