/projects/{project_id}/branches/{branch_id}/auth/email_and_passwordUpdate email and password configurationUpdates the email and password authentication configuration for the specified branch's Neon Auth integration. Only the fields provided in the request body are updated.
Parameters
project_idstringpathrequiredThe Neon project ID
branch_idstringpathrequiredThe Neon branch ID
Request body
requiredapplication/json
auto_sign_in_after_verificationbooleanWhether users are automatically signed in after verifying their email
disable_sign_upbooleanWhether to disable new user sign ups. When omitted, the current setting is not changed.
email_verification_methodstringThe email verification method to use. - `link`: Sends a verification link via email - `otp`: Sends a one-time password (OTP) via email
enabledbooleanControls whether email and password authentication is enabled for this project. When omitted from an update request, the current value is unchanged.
require_email_verificationbooleanWhen true, users must verify their email address before they can sign in. Omitting this field from an update request leaves the current value unchanged.
send_verification_email_on_sign_inbooleanWhether to send a verification email when a user with an unverified email signs in.
send_verification_email_on_sign_upbooleanWhether to send a verification email when users sign up.
{
"auto_sign_in_after_verification": true,
"disable_sign_up": true,
"email_verification_method": "link",
"enabled": true,
"require_email_verification": true,
"send_verification_email_on_sign_in": true,
"send_verification_email_on_sign_up": true
}Responses
auto_sign_in_after_verificationbooleanrequiredWhether users are automatically signed in after verifying their email
disable_sign_upbooleanrequiredWhether to disable new user sign ups
email_verification_methodstringrequiredThe email verification method to use. - `link`: Sends a verification link via email - `otp`: Sends a one-time password (OTP) via email
enabledbooleanrequiredWhether email and password authentication is enabled
require_email_verificationbooleanrequiredWhether email verification is required before users can sign in
send_verification_email_on_sign_inbooleanrequiredWhether to send a verification email when users sign in
send_verification_email_on_sign_upbooleanrequiredWhether to send a verification email when users sign up
{
"auto_sign_in_after_verification": true,
"disable_sign_up": true,
"email_verification_method": "link",
"enabled": true,
"require_email_verification": true,
"send_verification_email_on_sign_in": true,
"send_verification_email_on_sign_up": true
}codestringrequiredmessagestringrequiredError message
request_idstringUnique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
{
"code": "",
"message": "string",
"request_id": "string"
}