API7 Docs
API7 GatewayAPI7 Enterprise Admin APIsUpdate SMTP server settings

Update SMTP server settings

PUT /api/system_settings/smtp_server

PUT /api/system_settings/smtp_server

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Request Body

application/json

Response Body

application/json

application/json

curl -X PUT "$API_BASE_URL/api/system_settings/smtp_server" \  -H "Content-Type: application/json" \  -d '{    "enable": true,    "address": "smtp.example.com:587",    "ssl_verify": true,    "username": "smtp-user@example.com",    "password": "secretpassword123",    "from_name": "John Doe",    "from_address": "sender@example.com"  }'

SMTP server settings updated successfully.

{
  "value": {
    "enable": true,
    "address": "smtp.example.com:587",
    "authentication_type": "TLS",
    "ssl_verify": true,
    "username": "smtp-user@example.com",
    "password": "secretpassword123",
    "from_name": "John Doe",
    "from_address": "sender@example.com"
  }
}
Complete operation details and schema variants

PUT /api/system_settings/smtp_server

Update SMTP server settings

Update SMTP server configuration used for system email delivery, including notifications and verification emails. Ensure credentials and host settings are valid to avoid delivery failures.

Required IAM Permission: Action iam:UpdateSMTPServer, Resource arn:api7:iam:organization/*

Parameters

Request body

Content type: application/json

  • enable (boolean, required): Enable SMTP Server.
  • address (string, required): The SMTP server address in host:port format.
  • authentication_type (string, optional): The authentication type of the SMTP server.
  • ssl_verify (boolean, required): Whether to validate server-side SSL.
  • username (string, required): Username used to authenticate with the SMTP server.
  • password (string, required): Password used to authenticate with the SMTP server.
  • from_name (string, required): Sender's name.
  • from_address (string, required): Sender's email address.

Responses

  • 200: SMTP server settings updated successfully.
  • allOf variant 1
  • value (object, optional): The specific resource.
  • allOf variant 2
  • value (object, optional):
  • value.enable (boolean, required): Enable SMTP Server.
  • value.address (string, required): The SMTP server address in host:port format.
  • value.authentication_type (string, optional): The authentication type of the SMTP server.
  • value.ssl_verify (boolean, required): Whether to validate server-side SSL.
  • value.username (string, required): Username used to authenticate with the SMTP server.
  • value.password (string, required): Password used to authenticate with the SMTP server.
  • value.from_name (string, required): Sender's name.
  • value.from_address (string, required): Sender's email address.
  • 400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
  • value (object, optional): The specific resource.
  • error_msg (string, optional): The error message.

cURL

curl -X PUT '$API_BASE_URL/api/system_settings/smtp_server'