PATCH/projects/{project_id}/auth/email_serverDeprecated

Update email server configuration

Updates the email server configuration for a Neon project. This operation is closing down and will be removed on March 1, 2026. Use PATCH /projects/{project_id}/branches/{branch_id}/auth/email_provider instead.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 6 body fields
project_idstringrequired
The Neon project identifier. Must contain 1 to 60 lowercase letters, digits, or hyphens.

Email server configuration, using either SMTP connection settings or shared email server sender details.

hoststringoptional
Hostname of the email server.
portintegeroptional
TCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission).
usernamestringoptional
Username for authenticating with the SMTP server.
passwordstringoptional
Password for authenticating with the SMTP server.
sender_emailstringoptional
Email address used as the From address on outgoing auth emails.
sender_namestringoptional
Display name shown as the sender in outgoing emails.

2 status codes
200Returns the updated email server configuration, including SMTP settings or shared-server sender details.
hoststringrequired
Hostname of the email server.
portintegerrequired
TCP port of the SMTP server. Common values: 25 (SMTP), 465 (SMTPS), 587 (submission).
usernamestringrequired
Username for authenticating with the SMTP server.
passwordstringrequired
On 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.
sender_emailstringrequired
Email address used as the From address on outgoing auth emails.
sender_namestringrequired
Display name shown as the sender in outgoing emails.
defaultReturned when the request fails with a general error not covered by a specific response. Retry safety depends on whether the request reached the server and the response status.
request_idstringoptional
Unique 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.
codestringrequired
Machine-readable code classifying the error type. See `message` for a human-readable explanation.
Default:
messagestringrequired
Error message

Error handling

The project_id path parameter must contain 1 to 60 lowercase letters, digits, or hyphens. The request body must match either the SMTP configuration shape, with host, port, username, password, sender_email, and sender_name, or the shared-server shape, with sender_email and sender_name.