# Update domain Update domain configuration like smtp credentials, enable/disable automatic sender security, spam actions, wildcard, or tracking web scheme. Endpoint: PUT /v4/domains/{name} Version: 3.0.0 Security: basicAuth ## Path parameters: - `name` (string, required) The name of the domain you want to update ## Request fields (multipart/form-data): - `archive_to` (string) If set to a URL, then each successfully delivered message will be submitted in an HTTP POST request to the URL. The Content-Type of the POST requests is application/mime and the request body is exactly what the recipient SMTP server received. - `mailfrom_host` (string) The hostname to update to. Must be in lower case - `message_ttl` (integer) Specifies the time-to-live (TTL) in seconds for retrieving both incoming and outgoing messages. The maximum TTL value is determined by your subscription plan. - `require_tls` (boolean) If set to true, this requires messages for the domain only be sent over a TLS connection. If a TLS connection cannot be established, Mailgun will not deliver the message. If set to false, Mailgun will still try and upgrade the connection, but if Mailgun cannot, the message will be delivered over a plaintext SMTP connection. The default value is false. - `skip_verification` (boolean) If set to true, the certificate and hostname will not be verified when trying to establish a TLS connection and Mailgun will accept any certificate during delivery of a message. If set to false, Mailgun will verify the certificate and hostname. If either one can not be verified, a TLS connection will not be established. The default value is false. - `smtp_password` (string) Updates the domain's SMTP credentials with the given string - `spam_action` (string) Updates the domain's spam action. Valid values are 'disabled', 'tag', and 'block' - `use_automatic_sender_security` (boolean) Enable or disable Automatic Sender Security. If enabled, requires setting DNS CNAME entries for DKIM keys instead of a TXT record. Domain must be reverified after changing this field. Defaults to false - `web_scheme` (string) Updates your open, click and unsubscribe URLs to use http or https. Value either or . Defaults to http. In order for https to work, you must have a valid cert created for your domain. See Domain Tracking for TLS cert generation. - `web_prefix` (string) This updates the web prefix used for a domain's tracking features. Must be a valid atom. Nothing will be updated if omitted. This impacts click, open, and unsubscribe tracking features. Note: Updating the web prefix for a domain will require also updating the domain's DNS to include the CNAME record to match. For example, if you set the web prefix to for the domain , the corresponding CNAME will need to be created in your domain's dns zone. - `wildcard` (boolean) Updates the domain's wildcard status with the given boolean ## Response 200 fields (application/json): - `message` (string, required) Success message - `domain` (any, required) Domain object - `receiving_dns_records` (array) List of DNS records required for receiving emails - `sending_dns_records` (array) List of DNS records required for sending emails ## Response 401 fields (application/json): - `message` (string, required) Response message ## Response 404 fields (application/json): - `message` (string, required) Response message