Skip to main content
Lakebase Postgres is built on object storage, but 99.99999% of reads are served from high-performance local caches
/APIs & SDKs/Authentication/Update email and password configuration
PATCH/projects/{project_id}/branches/{branch_id}/auth/email_and_password

Update email and password configuration

Updates the email and password authentication configuration for the specified branch's Neon Auth integration. Only the fields provided in the request body are updated.

Markdown for AI context

Quick start

REST API - curl
curl "https://console.neon.tech/api/v2/projects/$PROJECT_ID/branches/$BRANCH_ID/auth/email_and_password" \
  -X PATCH \
  -H "Authorization: Bearer $NEON_API_KEY"
Also available in
neon neon-auth config email-password update

Parameters

Project ID
project_id
string

The Neon project ID

Branch ID
branch_id
string

The Neon branch ID

Request body

No field is required.

Enabled
enabled
boolean

Controls whether email and password authentication is enabled for this project. When omitted from an update request, the current value is unchanged.

Email verification method
email_verification_method
string

Email verification method. link: sends a verification link. otp: sends a one-time password.

linkotp
Require email verification
require_email_verification
boolean

When true, users must verify their email address before they can sign in. Omitting this field from an update request leaves the current value unchanged.

Auto sign in after verification
auto_sign_in_after_verification
boolean

Whether users are automatically signed in after verifying their email

Send verification email on sign up
send_verification_email_on_sign_up
boolean

Whether to send a verification email when users sign up.

Send verification email on sign in
send_verification_email_on_sign_in
boolean

Whether to send a verification email when a user with an unverified email signs in.

Disable sign up
disable_sign_up
boolean

Whether to disable new user sign ups. When omitted, the current setting is not changed.

Revoke sessions on password reset
revoke_sessions_on_password_reset
boolean

Whether all of a user's sessions are revoked when their password is reset. When omitted, the current setting is not changed.

Response

200

The email and password configuration has been updated

Depth
"enabled": (boolean),req
"email_verification_method": (string),reqlink | otp
"require_email_verification": (boolean),req
"auto_sign_in_after_verification": (boolean),req
"send_verification_email_on_sign_up": (boolean),req
"send_verification_email_on_sign_in": (boolean),req
"disable_sign_up": (boolean),req
"revoke_sessions_on_password_reset": (boolean),req

Errors

default

General error

This endpoint can return the standard Neon API error response.

Response fields

  • message Required. Human-readable error message.
  • code Required. Machine-readable error code.
  • request_id Optional. Request identifier for debugging. You can provide one with the X-Request-ID header.

Retry guidance

If no response is returned, the request may still have reached the server. This is why retry safety depends on the method and status code.

Idempotent methods (GET, HEAD, OPTIONS) are generally safe to retry after a network error or timeout. Non-idempotent methods (POST, PATCH, DELETE, PUT) can change state, so avoid automatic retries unless your workflow can tolerate duplicate effects.

Responses with 423 Locked or 503 Service Unavailable are safe to retry. 423 Locked means the resource is temporarily locked, usually because another operation is in progress.

Was this page helpful?