Turn receiving on or off for an email domain
set_site_email_domain_receiving
Turns receiving on or off for one verified email domain of a site, which decides whether mail sent to that domain is forwarded.
While receiving is on, and while the site's forwarding is on, mail sent to any address at exactly that domain is forwarded to the site's confirmed forwarding addresses, just like mail to the built-in sending domain, replies to a sending address on that domain included. That mail only arrives once the domain's MX record points to the value of its receiving record, which emailDomains.items lists while receiving is on. Pointing it there moves all of the domain's mail away from the mailboxes it reaches today, so the tool tells the client to confirm that with you first.
Turning it on is refused while the domain is not verified, with Only a verified email domain can receive email!, and while forwarding is not set up on the platform, with Email forwarding is not set up on this server yet! It is also refused while one of the site's forwarding addresses is at that domain, because forwarding to it would loop, with A forwarding address of this site is at this domain, so its mail would come straight back. Remove that address first!
Turning it off always works. But while the domain's MX record still points here, every message sent to it from then on, and any message still waiting to be forwarded, is dropped and never forwarded later. The tool tells the client to confirm that with you first and to tell you to point the MX record back at your own mailboxes.
It needs the Delete projects permission, like the forwarding switch. See Receive mail at your domain.
Request
Call it with a POST to https://api.modulify.ai/v1/set_site_email_domain_receiving, sending the inputs below as a JSON object. The token needs the config:write scope.
This method is marked destructive: it deletes or overwrites data. Check the inputs before you call it, and send an Idempotency-Key header whenever you might retry it.
curl -X POST https://api.modulify.ai/v1/set_site_email_domain_receiving \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"projectId":"PROJECT_ID","domainId":"DOMAIN_ID","enabled":true}'Over MCP, the same method is the set_site_email_domain_receiving tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. |
domainId |
string | Yes | The id of the email domain, from emailDomains.items in get_site_email_settings. |
enabled |
boolean | Yes | True to turn receiving on, false to turn it off. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.