---
updatedAt: 2026-04-21T10:14:20.000Z
agentTools:
  projectIndex: https://api-docs.neon.tech/llms.txt
---

# Update Neon Auth webhook configuration

Updates the webhook configuration for the specified branch's Neon Auth integration.
Webhooks notify an external endpoint when auth events occur, such as user creation or sign-in.


# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "servers": [
    {
      "url": "https://console.neon.tech/api/v2"
    }
  ],
  "info": {
    "title": "Neon API",
    "description": "The Neon API is the management API for Neon. Use it to provision, configure, and manage resources such as projects, branches, databases, roles, functions, and object storage.\n\nSee the [Neon API reference](https://neon.com/docs/reference/api) for details, and [Manage API keys](https://neon.com/docs/manage/api-keys/) to create and use API keys.",
    "version": "v2",
    "contact": {
      "email": "help@databricks.com"
    },
    "license": {
      "name": "Proprietary"
    }
  },
  "x-readme": {
    "samples-languages": [
      "shell"
    ]
  },
  "security": [
    {
      "BearerAuth": []
    },
    {
      "CookieAuth": []
    },
    {
      "TokenCookieAuth": []
    }
  ],
  "tags": [
    {
      "name": "Auth",
      "description": "These methods allow you to create and manage Neon Auth projects."
    }
  ],
  "paths": {
    "/projects/{project_id}/branches/{branch_id}/auth/webhooks": {
      "parameters": [
        {
          "name": "project_id",
          "in": "path",
          "description": "The Neon project ID",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9-]{1,60}$"
          }
        },
        {
          "name": "branch_id",
          "in": "path",
          "description": "The Neon branch ID",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-z0-9-]{1,60}$"
          }
        }
      ],
      "put": {
        "summary": "Update Neon Auth webhook configuration",
        "description": "Updates the webhook configuration for the specified branch's Neon Auth integration.\nWebhooks notify an external endpoint when auth events occur, such as user creation or sign-in.\n",
        "tags": [
          "Auth"
        ],
        "operationId": "updateNeonAuthWebhookConfig",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NeonAuthWebhookConfig"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the updated webhook configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NeonAuthWebhookConfig"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/GeneralError"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "GeneralError": {
        "description": "General Error.\n\nThe request may or may not be safe to retry, depending on the HTTP method, response status code,\nand whether a response was received.\n\n- If no response is returned from the API, a network error or timeout likely occurred.\n- 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.\n\nThe following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**.\nThe following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout.\n\nAny request that returns a `503 Service Unavailable` response is always safe to retry.\n\nAny 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.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GeneralError"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "The Neon API requires an API key to authorize your requests, which you can enter below.\nRefer to our documentation to find out how to generate and use [API keys](https://neon.com/docs/manage/api-keys).\n"
      },
      "CookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "zenith"
      },
      "TokenCookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "keycloak_token"
      }
    },
    "schemas": {
      "NeonAuthWebhookConfig": {
        "type": "object",
        "required": [
          "enabled"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether the webhook is active."
          },
          "webhook_url": {
            "type": "string",
            "description": "Destination URL that receives webhook event payloads."
          },
          "enabled_events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "user.before_create",
                "user.created",
                "send.otp",
                "send.magic_link",
                "organization.invitation.created",
                "organization.invitation.accepted",
                "phone_number.verified"
              ]
            },
            "description": "Event types that trigger this webhook. Covers user lifecycle, email/OTP delivery, organization invitations, and phone verification events; see the enum for exact values."
          },
          "timeout_seconds": {
            "type": "integer",
            "default": 5,
            "minimum": 1,
            "maximum": 10,
            "description": "Maximum time, in seconds, to wait for a response from the webhook endpoint."
          }
        }
      },
      "GeneralError": {
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "request_id": {
            "type": "string",
            "description": "Unique identifier for the request, useful for debugging.\nYou can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.\n"
          },
          "code": {
            "$ref": "#/components/schemas/ErrorCode",
            "description": "Machine-readable code classifying the error type. See `message` for a human-readable explanation."
          },
          "message": {
            "description": "Error message",
            "type": "string"
          }
        }
      },
      "ErrorCode": {
        "type": "string",
        "default": ""
      }
    }
  }
}
```