
In short: the domains you register for your clients stay in your account, and the day to day of each one is done through the API, without opening My MozOut: nameservers, renewal, auto-renew and the transfer lock, one domain at a time. Whatever you change through the API shows at once. The domain reseller page has the summary.
Reading needs domains:read; changing needs domains:write. Renewal is a purchase, so it also needs billing:purchase.
Nameservers
GET /v1/domains/{domain}/nameservers reads the nameservers at the registry and tells you, in uses_our_nameservers, whether they are ours. PUT /v1/domains/{domain}/nameservers changes them: send 2 to 5.
curl https://api.mozout.com/v1/domains/yourcompany.com/nameservers -X PUT \
-H "Authorization: Bearer $MOZOUT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"nameservers": ["ns1.yourcompany.com", "ns2.yourcompany.com"]}'
| The domain of your account e-mail cannot be changed here. If the account e-mail, or that of one of its users, is on this domain or a subdomain of it, the change answers 409 account_email_domain, in Sandbox too. Whoever controls that mail gets password resets and login codes, so that change is made in My MozOut. See which e-mail is which. |
Reading the nameservers, the lock and the contacts is limited to 30 requests per minute, per account. The nameservers and the lock may come from a copy up to 60 seconds old, which does not count towards that limit. If the domain uses our nameservers, its DNS zone is handled as in DNS through the API.
Renewing and choosing auto-renew
POST /v1/domains/{domain}/renew renews for years more, from 1 to 10, with the Idempotency-Key header. It is paid from your credit, at your Agence discount. A domain cannot be valid for more than 10 years: if the extension has no price for those years, the answer is 422 period_not_available and nothing is charged.
curl https://api.mozout.com/v1/domains/yourcompany.com/renew -X POST \
-H "Authorization: Bearer $MOZOUT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: renew-yourcompany.com-2027" \
-d '{"years": 1}'
With PUT /v1/domains/{domain}/auto-renew and {"auto_renew": true} or false, you choose, domain by domain, whether it renews on its own or you renew it by hand. A common set-up: auto-renew for clients who pay on time, and a manual renewal for the rest, once the client has paid.
Transfer lock
The lock protects the domain against transfers nobody authorised. It is switched on at registration unless you ask otherwise. GET /v1/domains/{domain}/lock shows its state and PUT /v1/domains/{domain}/lock changes it, with {"locked": true} or false.
If a client wants to move the domain elsewhere, switch the lock off and request the transfer code with POST /v1/domains/{domain}/transfer-code. It needs the domains:transfer_code permission and the domain name in confirm. The code never comes in the response: it goes to the account or registrant e-mail.
| Before a bigger change, such as swapping the nameservers of a client with live e-mail, keep a copy of the zone: DNS keeps the last 20 copies of each domain, and you can restore one if something goes wrong. For when to switch the lock off, see what the lock protects. |
|
Manage your clients' domains from your own system. See what else the API does on the domain reseller page. See the domain reseller page |
RECOMMENDED PRODUCT Register your .com domain Secure your company name before someone else registers it. from £13.60/yr Search a domain |











