API: Domains
The domains a key may use and the plan limits of each.
/domains any key List domains
The domains this key may use, each with its plan limits (allowed types, minimum TTL, most records), or null when the plan sets none.
curl -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains {"ok":true,"data":[{"domain":"example.com","limits":{"types":["A","TXT"],"min_ttl":300,"max_records":100}}]} /domains/{domain} any key Domain state
Plan and its end, limits, record count, proxied names, nameservers (ours and own), the delegation and email state.
curl -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com /domains domains.manage Add a domain
Adds a domain and copies the records it answers today; then set the nameservers it returns at the registrar.
| Body field | Values | Meaning |
|---|---|---|
domainRequired | Text | The domain name. |
curl -X POST -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains {"ok":true,"data":{"domain":"example.org","copied":7,"cdn_edges":[],"name_servers":["ns1.cloud9.ir","ns2.cloud9.ir"]}} /domains/{domain} domains.manage Remove a domain
Removes a domain you added; send its name in confirm.
| Body field | Values | Meaning |
|---|---|---|
confirmRequired | Text | The domain name again, to confirm. |
curl -X DELETE -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com /domains/{domain}/history any key Change history
Changes of the domain from the portal, the API and AI assistants, newest first, for 90 days, with who made them.
| Query field | Values | Meaning |
|---|---|---|
limit | 1-200 | Most rows to return. |
curl -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/history /domains/{domain}/nameservers records.read Nameservers
Our nameservers, your own nameservers with the glue addresses to register, and the last delegation check.
curl -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/nameservers /domains/{domain}/nameservers domain.settings Own nameservers on or off
own_on shows ns1.yourdomain and the like (labels optional), own_off goes back to ours; 422 not_in_plan without the plan option.
| Body field | Values | Meaning |
|---|---|---|
actionRequired | own_on | own_off | own_on or own_off. |
labels | Text | Optional names, such as ["ns1","ns2"]. |
curl -X POST -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/nameservers /domains/{domain}/ns-check records.read Check the delegation now
Asks the registry which nameservers the domain has; at most once in 10 seconds (429).
curl -X POST -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/ns-check /domains/{domain}/export records.read Export the zone
The zone file as plain text (BIND), proxied records marked.
curl -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/export /domains/{domain}/import records.write Import records
From a zone file, a list of records or the previous provider with your token there. A dry run (the default) returns the plan; with dry_run false the missing records are created and nothing is changed or deleted.
| Body field | Values | Meaning |
|---|---|---|
zone_file | Text | A zone file as text (BIND, dig or a provider export). |
records | Text | Or a list of record objects. |
provider | Text | Or the previous provider's name, with api_token. |
api_token | Text | Your API token at the previous provider; used once, never stored. |
dry_run | true | false | true (default) returns the plan only. |
keep_proxy | true | false | Keep the proxy flag of the previous provider. |
curl -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
--data-binary @- https://my.cloud9.ir/api/customer/v1/domains/example.com/import <<'JSON'
{"zone_file": "www 300 IN A 203.0.113.10\nmail 300 IN A 203.0.113.25", "dry_run": true}
JSON No answer here? Sign in to the portal and open a ticket. Open a ticket