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: wayscloud_dns_abc12_YOUR_SECRET"Response:
{
"zones": [
{
"zone_id": "d7e8f9a0-b1c2-3456-7890-abcdef123456",
"zone_name": "example.com",
"zone_type": "master",
"status": "active",
"dnssec_enabled": true,
"record_count": 24,
"nameservers": [
"grieg.wayscloud.no",
"bohr.wayscloud.dk",
"lindgren.wayscloud.se",
"aalto.wayscloud.fi"
],
"created_at": "2024-01-10T08:00:00Z"
}
],
"total": 1
}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: wayscloud_dns_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"zone_name": "example.com",
"zone_type": "master"
}'Response:
{
"zone_id": "d7e8f9a0-b1c2-3456-7890-abcdef123456",
"zone_name": "example.com",
"zone_type": "master",
"status": "active",
"dnssec_enabled": true,
"record_count": 24,
"nameservers": [
"grieg.wayscloud.no",
"bohr.wayscloud.dk",
"lindgren.wayscloud.se",
"aalto.wayscloud.fi"
],
"created_at": "2024-01-10T08:00:00Z"
}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: wayscloud_dns_abc12_YOUR_SECRET"Response:
{
"zone_id": "d7e8f9a0-b1c2-3456-7890-abcdef123456",
"zone_name": "example.com",
"zone_type": "master",
"status": "active",
"dnssec_enabled": true,
"record_count": 24,
"nameservers": [
"grieg.wayscloud.no",
"bohr.wayscloud.dk",
"lindgren.wayscloud.se",
"aalto.wayscloud.fi"
],
"created_at": "2024-01-10T08:00:00Z"
}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: wayscloud_dns_abc12_YOUR_SECRET"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: wayscloud_dns_abc12_YOUR_SECRET"Response:
{
"records": [
{
"record_id": "e8f9a0b1-c2d3-4567-890a-bcdef1234567",
"zone_id": "d7e8f9a0-b1c2-3456-7890-abcdef123456",
"record_type": "A",
"host": "",
"record": "185.35.202.45",
"ttl": 3600,
"priority": null,
"weight": null,
"port": null,
"status": "active",
"created_at": "2024-01-10T08:05:00Z"
},
{
"record_id": "a0b1c2d3-e4f5-6789-0abc-def123456789",
"zone_id": "d7e8f9a0-b1c2-3456-7890-abcdef123456",
"record_type": "MX",
"host": "",
"record": "mail.example.com",
"ttl": 3600,
"priority": 10,
"weight": null,
"port": null,
"status": "active",
"created_at": "2024-01-10T08:06:00Z"
}
],
"total": 2
}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: wayscloud_dns_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"record_type": "A",
"host": "www",
"record": "192.0.2.1",
"ttl": 3600
}'Response:
{
"record_id": "e8f9a0b1-c2d3-4567-890a-bcdef1234567",
"zone_id": "d7e8f9a0-b1c2-3456-7890-abcdef123456",
"record_type": "A",
"host": "www",
"record": "185.35.202.45",
"ttl": 3600,
"priority": null,
"weight": null,
"port": null,
"status": "active",
"created_at": "2024-01-10T08:05:00Z"
}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: wayscloud_dns_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"record": "192.0.2.50",
"ttl": 1800
}'Response:
{
"record_id": "e8f9a0b1-c2d3-4567-890a-bcdef1234567",
"zone_id": "d7e8f9a0-b1c2-3456-7890-abcdef123456",
"record_type": "A",
"host": "www",
"record": "185.35.202.45",
"ttl": 3600,
"priority": null,
"weight": null,
"port": null,
"status": "active",
"created_at": "2024-01-10T08:05:00Z"
}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: wayscloud_dns_abc12_YOUR_SECRET"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: wayscloud_dns_abc12_YOUR_SECRET"Response:
{
"status": "success",
"message": "DNSSEC activated successfully",
"dnssec_data": {}
}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: wayscloud_dns_abc12_YOUR_SECRET"Response:
{
"status": "success",
"message": "DNSSEC deactivated successfully"
}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: wayscloud_dns_abc12_YOUR_SECRET"Response:
{
"zone_name": "example.com",
"period": "30d",
"total_queries": 425000,
"data": [
{
"date": "2026-09-15",
"queries": 15420
},
{
"date": "2026-09-14",
"queries": 14980
}
],
"network": "Anycast DNS with global distribution"
}