Appearance
smtp
3 endpoints.
GET /api/v1/settings/smtp
Get Smtp
The site's SMTP settings (DB-over-env), password withheld.
200 — Successful Response
json
{}PUT /api/v1/settings/smtp
Update Smtp
Upsert the SMTP settings, then return the refreshed (masked) view.
Request body
json
{
"properties": {
"host": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "Host"
},
"port": {
"anyOf": [
{
"type": "integer",
"maximum": 65535,
"minimum": 1
},
{
"type": "null"
}
],
"title": "Port"
},
"user": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "User"
},
"password": {
"anyOf": [
{
"type": "string",
"maxLength": 512
},
{
"type": "null"
}
],
"title": "Password"
},
"security": {
"anyOf": [
{
"type": "string",
"pattern": "^(starttls|ssl|none)$"
},
{
"type": "null"
}
],
"title": "Security"
},
"from": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "From"
},
"from_name": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "From Name"
},
"timeout": {
"anyOf": [
{
"type": "number",
"maximum": 300,
"exclusiveMinimum": 0
},
{
"type": "null"
}
],
"title": "Timeout"
}
},
"type": "object",
"title": "SmtpIn",
"description": "Partial update for the site's SMTP settings. A field omitted (``None``) is\nleft untouched; an empty string clears that field's override (falls back to\n``.env``)."
}200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/settings/smtp/test
Test Smtp
Live connect + authenticate using the currently-saved credentials (DB-over-env). Sends nothing. Returns {ok, detail}.
200 — Successful Response
json
{}