Turn auto-renew of a bought domain on or off
set_domain_auto_renew
Turns auto-renew of a domain the workspace bought on or off.
While auto-renew is on, Modulify renews the domain itself before it expires. It tries 14 days, 7 days, 3 days and 1 day before Expires_At, checked every hour, and renews for RenewalYears years, the shortest renewal term, at RenewalPriceCents. Name.com's own auto renew always stays off, so Name.com never charges anyone by itself.
No checkout opens. Modulify charges the saved card of whoever the token belongs to, the default card in their billing details, and that person must still be allowed to manage the workspace's billing when it tries. Turning it on means that card is charged later without anyone being asked again, so the tool tells the client to confirm with you first, with the price and the date. It is refused while you have no saved card, with Add a card to your billing details first, then turn on auto-renew!, and paying on a buy_domain or renew_domain link does not save one.
When the card is declined or missing, or the bank asks to confirm the payment, that attempt fails, nothing is charged, the workspace owner and members are emailed the reason and the next attempt tries again. If the registrar refuses the renewal after payment, the payment is refunded. Nothing is tried after Expires_At, so an expired domain is renewed with renew_domain, until its RenewBy. A failed attempt shows in AutoRenew_Failed_At and AutoRenew_Error, and turning auto-renew off and on again clears it and makes Modulify try again within the hour when the domain is in its last 14 days. While it is off, the domain is renewed only once its renewal is paid. A workspace transfer turns it off for every domain of the workspace, and the new owner turns it on again to have them renewed on their own card.
The answer is the domain as get_bought_domain reads it, with AutoRenew and AutoRenew_By, the id of the person whose card is charged. Only the workspace owner can do this, and the domain must be active or expiring. The workspace can make 30 domain changes a minute, shared with the Domains page and covering DNS records, nameservers, the registrant, the transfer lock, auto-renew and transfer codes, and a refusal says how long to wait. See Auto-renew.
Request
Call it with a POST to https://api.modulify.ai/v1/set_domain_auto_renew, sending the inputs below as a JSON object. The token needs the domains:buy 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_domain_auto_renew \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"workspaceId":"WORKSPACE_ID","domainId":"DOMAIN_ID","enabled":true}'Over MCP, the same method is the set_domain_auto_renew tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
workspaceId |
string | Yes | The workspace that owns the domain. |
domainId |
string | Yes | The _id of the bought domain, from list_bought_domains. |
enabled |
boolean | Yes | True turns auto-renew on, false turns 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.