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 |
|---|---|---|
zone_name | string | Required. Domain name |
zone_type | string | Values: master, slave, parked |
Example:
{
"zone_name": "example.com",
"zone_type": "master"
}Response:
| Field | Type | Description |
|---|---|---|
zone_id | string | |
zone_name | string | Domain name |
zone_type | string | Values: master, slave, parked |
status | string | active, suspended or pending_deletion |
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 |
|---|---|---|
zone_id | string | |
zone_name | string | Domain name |
zone_type | string | Values: master, slave, parked |
status | string | active, suspended or pending_deletion |
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.
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, SPF |
host | string | Hostname in the zone: empty for the apex (@), * for a wildcard |
record | string | Required. Value |
ttl | integer | |
priority | integer | For MX/SRV |
weight | integer | For SRV |
port | integer | For SRV |
Example:
{
"record_type": "A",
"host": "www",
"record": "192.0.2.1",
"ttl": 3600
}Response:
| Field | Type | Description |
|---|---|---|
record_id | string | |
zone_id | string | |
record_type | string | Values: A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, PTR, SPF |
host | string | Hostname in the zone; empty for the apex (@) |
record | string | Record value: an address, a hostname or text |
ttl | integer | |
priority | integer | MX and SRV only |
weight | integer | SRV only |
port | integer | SRV only |
status | string | |
created_at | string |
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 | |
weight | integer | For SRV |
port | integer | For SRV |
Example:
{
"record": "192.0.2.50",
"ttl": 1800
}Response:
| Field | Type | Description |
|---|---|---|
record_id | string | |
zone_id | string | |
record_type | string | Values: A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, PTR, SPF |
host | string | Hostname in the zone; empty for the apex (@) |
record | string | Record value: an address, a hostname or text |
ttl | integer | |
priority | integer | MX and SRV only |
weight | integer | SRV only |
port | integer | SRV only |
status | string | |
created_at | string |
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.
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. Publish the DS records from dnssec_data at your registrar.
Response:
| Field | Type | Description |
|---|---|---|
status | string | |
message | string | |
dnssec_data | object | The signing keys and DS records to publish at your registrar, as the DNS platform reports them |
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 |
|---|---|---|
status | string | |
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 counts for the zone: per day for the last 30 days (period=30d, the default), or per year (period=yearly).
Response:
| Field | Type | Description |
|---|---|---|
zone_name | string | |
period | string | Values: 30d, yearly |
total_queries | integer | |
data | array | Query counts per day (30d) or per year (yearly), newest first |
network | string |
Example:
curl https://api.wayscloud.services/v1/dns/zones/{zone_name}/statistics \
-H "X-API-Key: YOUR_API_KEY"