Skip to content
The API may change between versions while TTX-Zone is 0.x.

Save email settings

PUT
/api/v1/instance/email
curl --request PUT \
--url https://example.com/api/v1/instance/email \
--header 'Content-Type: application/json' \
--header 'X-CSRF-Token: <X-CSRF-Token>' \
--cookie ttx_access_token=<ttx_access_token> \
--data '{ "enabled": true, "from_address": "example", "from_name": "example", "reply_to": "example", "smtp_host": "example", "smtp_password": "example", "smtp_port": 587, "smtp_security": "starttls", "smtp_username": "example" }'

Recorded (without the password), with step-up: whoever controls the mail server reads every message the deployment sends.

Media typeapplication/json
EmailSettingsUpdateRequest
object
enabled
Enabled
boolean
default: true
from_address
required
From Address
string
>= 3 characters <= 320 characters
from_name
Any of:
string
<= 120 characters
reply_to
Any of:
string
<= 320 characters
smtp_host
required
Smtp Host
string
>= 1 characters <= 253 characters
smtp_password
Any of:
string
<= 1000 characters
smtp_port
Smtp Port
integer
default: 587 >= 1 <= 65535
smtp_security
Smtp Security
string
default: starttls
Allowed values: starttls tls none
smtp_username
Any of:
string
<= 320 characters

Successful Response

Media typeapplication/json
EmailSettingsRead

Platform -> Email. Never carries a secret: has_password says whether one is stored, password_readable whether the current key still decrypts it.

object
active
required
Active
boolean
allow_insecure
required
Allow Insecure
boolean
configured
required
Configured
boolean
enabled
Enabled
boolean
failed
Failed
integer
0
from_address
Any of:
string
from_name
Any of:
string
has_password
Has Password
boolean
last_error
Any of:
string
last_failed_at
Any of:
string format: date-time
last_sent_at
Any of:
string format: date-time
password_readable
Password Readable
boolean
default: true
pending
Pending
integer
0
pinned_by_env
required
Pinned By Env
boolean
reply_to
Any of:
string
smtp_host
Any of:
string
smtp_port
Any of:
integer
smtp_security
Any of:
string
Allowed values: starttls tls none
smtp_username
Any of:
string
transport
Any of:
string
updated_at
Any of:
string format: date-time

Example

{
"enabled": false,
"failed": 0,
"has_password": false,
"password_readable": true,
"pending": 0,
"smtp_security": "starttls"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}