enableMailDomain
enableMailDomain: Enable email hosting on a domain you own. Free; mailboxes are what cost money. If the call fails with a DNS conflict (an existing SPF or MX record), ask the user for explicit consent, then re-call with spfMergeConfirmed=true and/or takeoverConfirmed=true. Requires authentication.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | The domain to enable email hosting on, e.g. 'example.com'. | |
| dnsMode | No | 'PDNS_AUTO' (default) publishes all mail DNS records automatically; the domain must use our nameservers. 'EXTERNAL_MANUAL' returns the DNS records for you to publish at your DNS provider, and the domain stays PENDING_DNS until verifyMailDns succeeds. | |
| sessionKey | No | Session key (osk_...) returned by checkDeviceLoginStatus. Pass it on every call when logged in via the in-chat device flow; omit when connected via OAuth. | |
| spfMergeConfirmed | No | Set true, only with the user's explicit consent, to replace a foreign SPF record. | |
| takeoverConfirmed | No | Set true, only with the user's explicit consent, to repoint a foreign MX record; this moves their live email. |