Set the SMTP server, or turn e-mail off with a null host
const url = 'https://gpu-kitchen.example.lan/api/v1/mail/settings';const options = { method: 'PUT', headers: {cookie: 'gpuk_session=<gpuk_session>', 'Content-Type': 'application/json'}, body: '{"host":"example","port":1,"security":"tls","username":"example","password":"example","from":"hello@example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://gpu-kitchen.example.lan/api/v1/mail/settings \ --header 'Content-Type: application/json' \ --cookie gpuk_session=<gpuk_session> \ --data '{ "host": "example", "port": 1, "security": "tls", "username": "example", "password": "example", "from": "hello@example.com" }'An omitted password keeps the stored one; null removes it. The password is stored encrypted and never read back.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Success.
object
Example
{ "security": "tls"}Error codes: mail_from_required, validation_error.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: auth_required.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: forbidden, management_key_read_only, super_admin_required.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: payload_too_large.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: rate_limited.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}