همهٔ سیستم‌ها عملیاتی‌اند
GET /api/v1/dns/zones #

List your DNS zones

دسترسی لازم: dns:read محدودیت نرخ: خواندن
پاسخ‌ها (۴)
  • 200 All zones (not paginated; meta.total = count) data[]: uuiddomainstatusnameserversproxy_enableddnssec_enabledlast_ns_checkcreated_atupdated_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks dns:read (details.required_scope)
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/dns/zones"

بازگشت به فهرست این بخش

POST /api/v1/dns/zones #

Create a DNS zone for a domain

دسترسی لازم: dns:write محدودیت نرخ: تغییر
فیلدهای بدنه (JSON) (۱)
domain string
الزامی Apex domain, e.g. example.com (lower-cased)
نمونهٔ بدنهٔ درخواست (JSON)
application/json
{
    "domain": "example.com"
}
پاسخ‌ها (۶)
  • 201 Zone created with status pending; set the returned nameservers at your registrar — records can be added once the zone is verified data: uuiddomainstatusnameserversproxy_enableddnssec_enabledlast_ns_checkcreated_atupdated_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks dns:write (details.required_scope)
  • 409 conflict — the domain already exists
  • 422 validation_failed — invalid domain
  • 429 rate_limited — write limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl -X POST \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domain":"example.com"}' \
  "https://iranclaud.ir/api/v1/dns/zones"

بازگشت به فهرست این بخش

GET /api/v1/dns/zones/{uuid} #

Get a DNS zone

دسترسی لازم: dns:read محدودیت نرخ: خواندن
پارامترهای مسیر (۱)
uuid string
الزامی Zone UUID
پاسخ‌ها (۵)
  • 200 Zone detail data: uuiddomainstatusnameserversproxy_enableddnssec_enabledlast_ns_checkcreated_atupdated_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks dns:read (details.required_scope)
  • 404 not_found — unknown zone
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/dns/zones/YOUR_UUID"

بازگشت به فهرست این بخش

GET /api/v1/dns/zones/{uuid}/export #

Export a zone as a BIND zonefile

دسترسی لازم: dns:read محدودیت نرخ: خواندن
پارامترهای مسیر (۱)
uuid string
الزامی Zone UUID
پاسخ‌ها (۵)
  • 200 BIND zonefile data: domainformatzonefile
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks dns:read (details.required_scope)
  • 404 not_found — unknown zone
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/dns/zones/YOUR_UUID/export"

بازگشت به فهرست این بخش

DELETE /api/v1/dns/zones/{uuid} #

Delete a DNS zone and all its records

دسترسی لازم: dns:write محدودیت نرخ: تغییر
پارامترهای مسیر (۱)
uuid string
الزامی Zone UUID
پاسخ‌ها (۵)
  • 200 Deleted data: deleted
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks dns:write (details.required_scope)
  • 404 not_found — unknown zone
  • 429 rate_limited — write limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl -X DELETE \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/dns/zones/YOUR_UUID"

بازگشت به فهرست این بخش

GET /api/v1/dns/zones/{uuid}/records #

List the records of a zone

دسترسی لازم: dns:read محدودیت نرخ: خواندن
پارامترهای مسیر (۱)
uuid string
الزامی Zone UUID
پارامترهای Query (۱)
type string
اختیاری Filter by record type (case-insensitive): A | AAAA | CNAME | MX | TXT | NS | SRV | CAA
پاسخ‌ها (۵)
  • 200 All matching records (not paginated; meta.total = count) data[]: idtypenamecontentttlpriorityproxy_enabledcreated_atupdated_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks dns:read (details.required_scope)
  • 404 not_found — unknown zone
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/dns/zones/YOUR_UUID/records"

بازگشت به فهرست این بخش

POST /api/v1/dns/zones/{uuid}/records #

Add a record to a zone

دسترسی لازم: dns:write محدودیت نرخ: تغییر
پارامترهای مسیر (۱)
uuid string
الزامی Zone UUID
فیلدهای بدنه (JSON) (۶)
type string
الزامی one of: A | AAAA | CNAME | MX | TXT | NS | SRV | CAA
name string
اختیاری Subdomain label, or @ for the apex — default: @
content string
الزامی Record value (IP, hostname, text …)
ttl integer
اختیاری 1 (or less) = Auto; other values are clamped to 60-86400 — default: 3600
priority integer | null
اختیاری For MX/SRV
proxy_enabled boolean
اختیاری Route through the CDN (A/AAAA/in-zone CNAME); usually set later via PATCH /api/v1/edge/records/{rid} — default: false
نمونهٔ بدنهٔ درخواست (JSON)
application/json
{
    "type": "A",
    "name": "shop",
    "content": "203.0.113.10",
    "ttl": 3600
}
پاسخ‌ها (۷)
  • 201 Record created data: idtypenamecontentttlpriorityproxy_enabledcreated_atupdated_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks dns:write (details.required_scope)
  • 404 not_found — unknown zone
  • 409 conflict — zone not verified yet (nameservers not set at the registrar)
  • 422 validation_failed — invalid type/name/content/priority, name too long, or conflicts with an existing record (e.g. CNAME next to other records)
  • 429 rate_limited — write limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl -X POST \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"type":"A","name":"shop","content":"203.0.113.10","ttl":3600}' \
  "https://iranclaud.ir/api/v1/dns/zones/YOUR_UUID/records"

بازگشت به فهرست این بخش

PATCH /api/v1/dns/zones/{uuid}/records/{rid} #

Update a record (type and name cannot change)

دسترسی لازم: dns:write محدودیت نرخ: تغییر
پارامترهای مسیر (۲)
uuid string
الزامی Zone UUID
rid integer
الزامی Record id (id from the record list)
فیلدهای بدنه (JSON) (۴)

All fields optional; omitted fields keep their value

content string
اختیاری
ttl integer
اختیاری 1 (or less) = Auto; other values are clamped to 60-86400
priority integer | null
اختیاری
proxy_enabled boolean
اختیاری
نمونهٔ بدنهٔ درخواست (JSON)
application/json
{
    "content": "203.0.113.20",
    "ttl": 1800
}
پاسخ‌ها (۶)
  • 200 Updated record data: idtypenamecontentttlpriorityproxy_enabledcreated_atupdated_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks dns:write (details.required_scope)
  • 404 not_found — unknown zone or record
  • 422 validation_failed — invalid content/priority
  • 429 rate_limited — write limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl -X PATCH \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"203.0.113.20","ttl":1800}' \
  "https://iranclaud.ir/api/v1/dns/zones/YOUR_UUID/records/42"

بازگشت به فهرست این بخش

DELETE /api/v1/dns/zones/{uuid}/records/{rid} #

Delete a record

دسترسی لازم: dns:write محدودیت نرخ: تغییر
پارامترهای مسیر (۲)
uuid string
الزامی Zone UUID
rid integer
الزامی Record id
پاسخ‌ها (۵)
  • 200 Deleted data: deleted
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks dns:write (details.required_scope)
  • 404 not_found — unknown zone or record
  • 429 rate_limited — write limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl -X DELETE \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/dns/zones/YOUR_UUID/records/42"

بازگشت به فهرست این بخش

همهٔ گروه‌های API