/projects/{project_id}/branches/{branch_id}/auth/email_providerUpdate email provider configurationUpdates the email provider configuration for the specified branch's Neon Auth integration. The email provider handles transactional messages such as verification emails and password reset links.
Partial standard updates — omitting fields to keep their stored values — are supported only for Better Auth integrations, which merge omitted fields server-side. Legacy Stack Auth integrations do not merge and require all six standard fields (host, port, username, password, sender_email, sender_name) on every update; a partial standard body is rejected with 400.
Parameters
project_idstringpathrequiredThe Neon project ID
branch_idstringpathrequiredThe Neon branch ID
Request body
requiredapplication/json
oneOf · 2 options
hoststringHostname of the email server.
passwordstringPassword for authenticating with the SMTP server.
portintegerTCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission).
sender_emailstringEmail address used as the From address on outgoing auth emails.
sender_namestringDisplay name shown as the sender in outgoing emails.
usernamestringUsername for authenticating with the SMTP server.
{
"sender_email": "string",
"sender_name": "string",
"type": "shared"
}Responses
oneOf · 2 options
hoststringrequiredHostname of the email server.
passwordstringrequiredOn GET, returned redacted (empty) for ordinary callers, while callers with project-credential read permission receive the stored password — do not assume this field is empty. Update (PATCH) responses always return it redacted (empty) regardless of permission. Provide a value on update to set or rotate the password.
portintegerrequiredTCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission).
sender_emailstringrequiredEmail address used as the From address on outgoing auth emails.
sender_namestringrequiredDisplay name shown as the sender in outgoing emails.
usernamestringrequiredUsername for authenticating with the SMTP server.
{
"sender_email": "string",
"sender_name": "string",
"type": "shared"
}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"
}