Skip to content

DNS API ​

DNS zones and records

Endpoints ​

MethodPathDescription
GET/v1/dns/zonesList zones
POST/v1/dns/zonesCreate zone
GET/v1/dns/zones/{zone_name}Get zone
DELETE/v1/dns/zones/{zone_name}Delete zone
GET/v1/dns/zones/{zone_name}/recordsList records
POST/v1/dns/zones/{zone_name}/recordsCreate 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/activateActivate DNSSEC
DELETE/v1/dns/zones/{zone_name}/dnssecDeactivate DNSSEC
GET/v1/dns/zones/{zone_name}/statisticsGet statistics

GET /v1/dns/zones ​

List zones

Get all DNS zones with nameservers and record counts.

Response:

FieldTypeDescription
zonesarray
totalinteger

Example:

bash
curl https://api.wayscloud.services/v1/dns/zones \
  -H "X-API-Key: wayscloud_dns_abc12_YOUR_SECRET"

Response:

json
{
  "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:

FieldTypeDescription
zone_namestringRequired. Domain name
zone_typestringValues: master, slave, parked

Example:

json
{
  "zone_name": "example.com",
  "zone_type": "master"
}

Response:

FieldTypeDescription
zone_idstring
zone_namestringDomain name
zone_typestringValues: master, slave, parked
statusstringactive, suspended or pending_deletion
dnssec_enabledboolean
record_countinteger
nameserversarray
created_atstring

Example:

bash
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:

json
{
  "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:

FieldTypeDescription
zone_idstring
zone_namestringDomain name
zone_typestringValues: master, slave, parked
statusstringactive, suspended or pending_deletion
dnssec_enabledboolean
record_countinteger
nameserversarray
created_atstring

Example:

bash
curl https://api.wayscloud.services/v1/dns/zones/{zone_name} \
  -H "X-API-Key: wayscloud_dns_abc12_YOUR_SECRET"

Response:

json
{
  "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:

bash
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:

FieldTypeDescription
recordsarray
totalinteger

Example:

bash
curl https://api.wayscloud.services/v1/dns/zones/{zone_name}/records \
  -H "X-API-Key: wayscloud_dns_abc12_YOUR_SECRET"

Response:

json
{
  "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:

FieldTypeDescription
record_typestringRequired. Values: A, AAAA, CNAME, MX, TXT, SRV, NS, CAA, PTR, SPF
hoststringHostname in the zone: empty for the apex (@), * for a wildcard
recordstringRequired. Value
ttlinteger
priorityintegerFor MX/SRV
weightintegerFor SRV
portintegerFor SRV

Example:

json
{
  "record_type": "A",
  "host": "www",
  "record": "192.0.2.1",
  "ttl": 3600
}

Response:

FieldTypeDescription
record_idstring
zone_idstring
record_typestringValues: A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, PTR, SPF
hoststringHostname in the zone; empty for the apex (@)
recordstringRecord value: an address, a hostname or text
ttlinteger
priorityintegerMX and SRV only
weightintegerSRV only
portintegerSRV only
statusstring
created_atstring

Example:

bash
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:

json
{
  "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:

FieldTypeDescription
hoststring
recordstring
ttlinteger
priorityinteger
weightintegerFor SRV
portintegerFor SRV

Example:

json
{
  "record": "192.0.2.50",
  "ttl": 1800
}

Response:

FieldTypeDescription
record_idstring
zone_idstring
record_typestringValues: A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, PTR, SPF
hoststringHostname in the zone; empty for the apex (@)
recordstringRecord value: an address, a hostname or text
ttlinteger
priorityintegerMX and SRV only
weightintegerSRV only
portintegerSRV only
statusstring
created_atstring

Example:

bash
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:

json
{
  "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:

bash
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:

FieldTypeDescription
statusstring
messagestring
dnssec_dataobjectThe signing keys and DS records to publish at your registrar, as the DNS platform reports them

Example:

bash
curl -X POST https://api.wayscloud.services/v1/dns/zones/{zone_name}/dnssec/activate \
  -H "X-API-Key: wayscloud_dns_abc12_YOUR_SECRET"

Response:

json
{
  "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:

FieldTypeDescription
statusstring
messagestring

Example:

bash
curl -X DELETE https://api.wayscloud.services/v1/dns/zones/{zone_name}/dnssec \
  -H "X-API-Key: wayscloud_dns_abc12_YOUR_SECRET"

Response:

json
{
  "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:

FieldTypeDescription
zone_namestring
periodstringValues: 30d, yearly
total_queriesinteger
dataarrayQuery counts per day (30d) or per year (yearly), newest first
networkstring

Example:

bash
curl https://api.wayscloud.services/v1/dns/zones/{zone_name}/statistics \
  -H "X-API-Key: wayscloud_dns_abc12_YOUR_SECRET"

Response:

json
{
  "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"
}