Set the outgoing mail server; an empty password keeps the stored one
Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication
PUT
/api/v1/tenants/{tid}/smtpSet the outgoing mail server; an empty password keeps the stored one
Authentication: session cookie __Host-panel_session (contract default; see Authentication).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tid | path | string | required | |
X-CSRF-Token | header | string | optional | Required on unsafe requests authenticated by session cookie; API keys do not use it. |
Request body
required
Content type: application/json
object
- no other properties
hoststring requiredportinteger requiredsecuritystring requiredAllowed values:"starttls""tls""none"usernamestring optionalpasswordstring optional write-onlyclear_passwordboolean optionalfromstring requiredfrom_namestring optional
Example
{
"host": "string",
"port": 0,
"security": "starttls",
"username": "string",
"password": "string",
"clear_password": true,
"from": "string",
"from_name": "string"
}Responses
200 Saved
Content type: application/json
hoststring requiredportinteger requiredsecuritystring requiredAllowed values:"starttls""tls""none"""usernamestring requiredfromstring requiredfrom_namestring requiredpassword_setboolean requiredA password is stored; it is never returned
configuredboolean required
Example
{
"host": "string",
"port": 0,
"security": "starttls",
"username": "string",
"from": "string",
"from_name": "string",
"password_set": true,
"configured": true
}default Error
Content type: application/json
codestring requiredmessagestring requireddetails_redactedboolean requiredcorrelation_idstring requiredretryableboolean required