Skip to content
You're viewing documentation for v2026.11.8-beta. It may be out of date.Go to latest
TimescaleDB Enterprise
Esc
↑↓navigate↵open⌘Jpreview

Set the SMTP settings

Replaces the settings. An omitted password keeps the stored one. The password is stored encrypted. Authentication needs TLS: STARTTLS (requireTls) or port 465.

PUT/api/v1/alert-smtp
Authorization
tse_sessionAPI key · cookierequired
Request body
requiredapplication/json
authPasswordstring

Omit to keep the stored password; empty string clears it

authUsernamestring

Omit for no authentication

fromstringrequired

Sender address

hellostring

Name sent in EHLO. Omit for the default

requireTlsboolean

Require STARTTLS. Omit for true. Port 465 always uses TLS

smarthoststringrequired

host:port of the SMTP server. Port 465 uses implicit TLS

Responses
200

OK

authUsernamestringrequired

Empty means no authentication

configuredbooleanrequired
fromstringrequired

Sender address

hellostringrequired

Name sent in EHLO; empty uses the default

passwordSetbooleanrequired

Whether a password is stored. No endpoint returns the password

passwordUnreadablebooleanrequired

The stored password cannot be decrypted; email is not sent until it is entered again

requireTlsbooleanrequired

Whether STARTTLS is required

smarthoststringrequired

host:port of the SMTP server

default

Error

codestring

Stable code of the refusal, when the route has codes

detailsstring[]

Additional detail, e.g. per-field validation failures

errorstringrequired

Human-readable error message

Request
curl -X PUT 'https://console.example.com/api/v1/alert-smtp' \
  -H 'Cookie: tse_session=YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "authPassword": "string",
  "authUsername": "string",
  "from": "string",
  "hello": "string",
  "requireTls": true,
  "smarthost": "string"
}'
Response
{
  "authUsername": "string",
  "configured": true,
  "from": "string",
  "hello": "string",
  "passwordSet": true,
  "passwordUnreadable": true,
  "requireTls": true,
  "smarthost": "string"
}