DNS API
DNS zones and records
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/dns/zones | List zones |
POST | /v1/dns/zones | Create zone |
GET | /v1/dns/zones/{zone_name} | Get zone |
DELETE | /v1/dns/zones/{zone_name} | Delete zone |
GET | /v1/dns/zones/{zone_name}/records | List records |
POST | /v1/dns/zones/{zone_name}/records | Create record |
PUT | /v1/dns/zones/{zone_name}/records/{record_id} | Update record |
DELETE | /v1/dns/zones/{zone_name}/records/{record_id} | Delete record |
POST | /v1/dns/zones/{zone_name}/dnssec/activate | Activate DNSSEC |
DELETE | /v1/dns/zones/{zone_name}/dnssec | Deactivate DNSSEC |
GET | /v1/dns/zones/{zone_name}/statistics | Get statistics |
GET /v1/dns/zones
List zones
Get all DNS zones with nameservers and record counts.
Response:
| Field | Type | Description |
|---|---|---|
zones | array | |
total | integer |
Example:
curl https://api.wayscloud.services/v1/dns/zones \
-H "X-API-Key: YOUR_API_KEY"POST /v1/dns/zones
Create zone
Create a DNS zone for a domain. Update your registrar nameservers after creation.
Request Body:
| Field | Type | Description |
|---|---|---|
domain | string | Required. Domain name |
Example:
{
"domain": "example.com"
}Response:
| Field | Type | Description |
|---|---|---|
name | string | |
status | string | Values: active, pending, disabled |
dnssec_enabled | boolean | |
record_count | integer | |
nameservers | array | |
created_at | string |
Example:
curl -X POST https://api.wayscloud.services/v1/dns/zones \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{...}'GET /v1/dns/zones/
Get zone
Get zone details: nameservers, DNSSEC status, and record count.
Response:
| Field | Type | Description |
|---|---|---|
name | string | |
status | string | Values: active, pending, disabled |
dnssec_enabled | boolean | |
record_count | integer | |
nameservers | array | |
created_at | string |
Example:
curl https://api.wayscloud.services/v1/dns/zones/{zone_name} \
-H "X-API-Key: YOUR_API_KEY"DELETE /v1/dns/zones/
Delete zone
Delete a zone and all its records permanently. Irreversible.
Response:
| Field | Type | Description |
|---|---|---|
success | boolean | |
message | string |
Example:
curl -X DELETE https://api.wayscloud.services/v1/dns/zones/{zone_name} \
-H "X-API-Key: YOUR_API_KEY"GET /v1/dns/zones/{zone_name}/records
List records
Get all DNS records (A, AAAA, CNAME, MX, TXT, etc.) with values and TTLs.
Response:
| Field | Type | Description |
|---|---|---|
records | array | |
total | integer |
Example:
curl https://api.wayscloud.services/v1/dns/zones/{zone_name}/records \
-H "X-API-Key: YOUR_API_KEY"POST /v1/dns/zones/{zone_name}/records
Create record
Add a DNS record. Supported types: A, AAAA, CNAME, MX, TXT, SRV, NS, CAA. Propagates within 5 minutes.
Request Body:
| Field | Type | Description |
|---|---|---|
record_type | string | Required. Values: A, AAAA, CNAME, MX, TXT, SRV, NS, CAA, PTR |
host | string | Required. Hostname |
record | string | Required. Value |
ttl | integer | |
priority | integer | For MX/SRV |
Example:
{
"record_type": "A",
"host": "www",
"record": "192.0.2.1",
"ttl": 3600
}Response:
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
type | string | Values: A, AAAA, CNAME, MX, TXT, NS, SRV, CAA |
content | string | |
ttl | integer | |
priority | integer |
Example:
curl -X POST https://api.wayscloud.services/v1/dns/zones/{zone_name}/records \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{...}'PUT /v1/dns/zones/{zone_name}/records/
Update record
Update record value, TTL, or priority.
Request Body:
| Field | Type | Description |
|---|---|---|
host | string | |
record | string | |
ttl | integer | |
priority | integer |
Example:
{
"record": "192.0.2.50",
"ttl": 1800
}Response:
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
type | string | Values: A, AAAA, CNAME, MX, TXT, NS, SRV, CAA |
content | string | |
ttl | integer | |
priority | integer |
Example:
curl -X PUT https://api.wayscloud.services/v1/dns/zones/{zone_name}/records/{record_id} \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{...}'DELETE /v1/dns/zones/{zone_name}/records/
Delete record
Delete a DNS record from a zone.
Response:
| Field | Type | Description |
|---|---|---|
success | boolean | |
message | string |
Example:
curl -X DELETE https://api.wayscloud.services/v1/dns/zones/{zone_name}/records/{record_id} \
-H "X-API-Key: YOUR_API_KEY"POST /v1/dns/zones/{zone_name}/dnssec/activate
Activate DNSSEC
Enable DNSSEC to protect against DNS spoofing. Configure returned DS records at your registrar.
Response:
| Field | Type | Description |
|---|---|---|
enabled | boolean | |
ds_records | array | |
algorithm | string |
Example:
curl -X POST https://api.wayscloud.services/v1/dns/zones/{zone_name}/dnssec/activate \
-H "X-API-Key: YOUR_API_KEY"DELETE /v1/dns/zones/{zone_name}/dnssec
Deactivate DNSSEC
Disable DNSSEC. Remove DS records from registrar first to avoid resolution failures.
Response:
| Field | Type | Description |
|---|---|---|
success | boolean | |
message | string |
Example:
curl -X DELETE https://api.wayscloud.services/v1/dns/zones/{zone_name}/dnssec \
-H "X-API-Key: YOUR_API_KEY"GET /v1/dns/zones/{zone_name}/statistics
Get statistics
Get query statistics: counts, response times, and geographic distribution.
Response:
| Field | Type | Description |
|---|---|---|
queries_today | integer | |
queries_this_month | integer | |
top_record_types | object | |
response_time_ms_avg | number |
Example:
curl https://api.wayscloud.services/v1/dns/zones/{zone_name}/statistics \
-H "X-API-Key: YOUR_API_KEY"