Skip to main content

Save mail configuration

Save mail configuration. PUT /api/openapi/v1/mail-servers/current, scope admin.v1.mail-settings.manage.

  • Scope: admin.v1.mail-settings.manage
  • Permission: Manage enterprise mail (mail-settings)
  • Permission type: Manage
  • Endpoint: PUT/api/openapi/v1/mail-servers/current
Saving preserves the current enabled state. To enable or disable custom SMTP, call /mail-servers/current/activation with the version returned after saving. On deployments without a system mail service, the first save retains the legacy automatic-enable behavior.

Authentication and request headers

Call with an application API key. This endpoint checks only the scope above; read, manage and execute permissions do not imply one another.
NameLocationTypeRequiredDescriptionExample
AuthorizationheaderstringYesApplication API key, passed as a Bearer token.Bearer qwk_***
X-Request-IdheaderstringNoOptional request tracing identifier; generated by the server if omitted.req-20260831-001

Request parameters

NameLocationTypeRequiredDescriptionExample
auth_enabledbodybooleanRequiredServer requires authenticationfalse
ca_pembodystringNoCustom CA certificate (optional)"<string>"
from_addressbodystring · emailRequiredSender email"developer@example.com"
from_namebodystringNoDisplay name"<string>"
hostbodystringRequiredSMTP host"<string>"
passwordbodystringNoPassword or authorization code"<string>"
portbodyinteger · int64RequiredPort1
tls_modebodystringRequiredEncryption mode"tls"
usernamebodystringNoAuthentication account"<string>"
versionbodyinteger · int64RequiredVersion used for concurrent update checks0

Request example

cURL

Responses

200 OK
NameTypeRequiredDescriptionExample
auth_enabledbooleanYesServer requires authenticationfalse
ca_pemstringYesCustom CA certificate (optional)"<string>"
enabledbooleanYesWhether custom SMTP is enabledfalse
central_availablebooleanYesWhether the deployment provides the system mail servicetrue
delivery_availablebooleanYesWhether custom SMTP or the system service is available for deliverytrue
configuredbooleanYesWhether configuration is presentfalse
from_addressstringYesSender email"<string>"
from_namestringYesDisplay name"<string>"
hoststringYesSMTP host"<string>"
last_testOpenapifacadeMailTestResultNoLast test result{"at":"2026-08-27T10:00:00Z","code":"<string>","server_version":0,"status":"unknown","template_id":"<string>"}
last_test.atstring · date-timeYesTest time"2026-08-27T10:00:00Z"
last_test.codestringYesError code"<string>"
last_test.server_versioninteger · int64YesMail server configuration version0
last_test.statusstringYesTest status"unknown"
last_test.template_idstringNoTemplate ID"<string>"
password_configuredbooleanYesWhether a password is configuredfalse
portinteger · int64YesPort0
providerstringYesMail delivery provider"central"
tls_modestringYesEncryption mode"tls"
updated_atstring · date-timeNoUpdated at"2026-08-27T10:00:00Z"
usernamestringYesAuthentication account"<string>"
versioninteger · int64YesVersion used for concurrent update checks0
Response example
default Flat business error
NameTypeRequiredDescriptionExample
codestringNoStable business error code"<string>"
detailstringYesHuman-readable error description"<string>"
detailsOpenapiErrorDetailsNoTest result details{"field":"<string>","reason":"<string>","suggestion":"<string>"}
details.fieldstringNoRequest field that failed validation"<string>"
details.reasonstringNoStable validation failure reason"<string>"
details.suggestionstringNoSuggested normalized value"<string>"
errorstringYesStable HTTP error type"<string>"
Response example