Email for your domain, with DNS setup handled. PostScale

    Sign Up

    Zones

    Create and manage DNS zones via the API.

    Overview

    Zones are the primary containers for DNS records. Each zone represents a domain (like example.com) and contains all the DNS records for that domain and its subdomains.

    Required scopes: zones:read, zones:write

    Using Python? The official SDK provides dns.zones helpers for these operations. Follow the Python SDK guide for installation, authentication, pagination, and a zone creation example.

    Endpoints

    Endpoint reference
    MethodEndpointDescription
    POST/v1/zonesCreate a new zone
    GET/v1/zonesList all zones
    GET/v1/zones/{zone_id}Get zone details
    PUT/v1/zones/{zone_id}Update a zone
    DELETE/v1/zones/{zone_id}Delete a zone
    GET/v1/zones/{zone_id}/usageGet zone usage statistics

    Create a Zone

    Create a new primary DNS zone:

    curl -X POST https://api.dnscale.eu/v1/zones \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "example.com",
        "type": "primary",
        "region": "EU_GLOBAL",
        "ttl": 3600
      }'

    Request Body:

    Scroll horizontally to see all columns →

    FieldTypeRequiredDescription
    namestringYesDomain name (e.g., example.com)
    typestringNoZone type: primary (default)
    regionstringNoDeployment region
    ttlintegerNoDefault TTL in seconds (default: 3600)

    Available Regions:

    RegionDescription
    EU_GLOBALEuropean Union plus Global anycast ASNs
    EUEuropean Union anycast ASN only
    GLOBALGlobal anycast ASN only

    When region is omitted, DNScale uses the default region configured for your customer account.

    Response:

    {
      "status": "success",
      "data": {
        "id": "zone_abc123",
        "name": "example.com",
        "type": "primary",
        "region": "EU_GLOBAL",
        "ttl": 3600,
        "status": "active",
        "dnssec_enabled": false,
        "nameservers": [
          "ns1.dnscale.eu",
          "ns1.dnscale.com",
          "ns2.dnscale.eu",
          "ns2.dnscale.com"
        ],
        "created_at": "2025-01-15T10:30:00Z",
        "updated_at": "2025-01-15T10:30:00Z"
      }
    }

    List Zones

    Retrieve all zones for your account:

    curl "https://api.dnscale.eu/v1/zones?limit=20&offset=0" \
      -H "Authorization: Bearer YOUR_API_KEY"

    Query Parameters:

    ParameterDefaultDescription
    limit10Number of zones per page (max: 100)
    offset0Number of zones to skip

    Response:

    {
      "status": "success",
      "data": {
        "zones": [
          {
            "id": "zone_abc123",
            "customer_id": "customer_abc123",
            "name": "example.com",
            "type": "master",
            "region": "EU_GLOBAL",
            "status": "active",
            "settings": {
              "dnssec_enabled": true
            },
            "created_at": "2026-08-18T10:00:00Z",
            "updated_at": "2026-08-18T10:00:00Z"
          },
          {
            "id": "zone_def456",
            "customer_id": "customer_abc123",
            "name": "example.org",
            "type": "master",
            "region": "EU_GLOBAL",
            "status": "active",
            "settings": {
              "dnssec_enabled": false
            },
            "created_at": "2026-08-18T10:00:00Z",
            "updated_at": "2026-08-18T10:00:00Z"
          }
        ],
        "pagination": {
          "total": 2,
          "offset": 0,
          "limit": 20,
          "count": 2,
          "has_more": false
        }
      }
    }

    Get Zone Details

    Retrieve detailed information about a specific zone:

    curl https://api.dnscale.eu/v1/zones/{zone_id} \
      -H "Authorization: Bearer YOUR_API_KEY"

    The response includes DNSSEC status and assigned nameservers.

    Update a Zone

    Update zone settings:

    curl -X PUT https://api.dnscale.eu/v1/zones/{zone_id} \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "ttl": 900,
        "status": "active"
      }'

    Updatable Fields:

    FieldTypeDescription
    ttlintegerDefault TTL for new records
    statusstringZone status: active, disabled

    Delete a Zone

    Delete a zone and all its records:

    curl -X DELETE https://api.dnscale.eu/v1/zones/{zone_id} \
      -H "Authorization: Bearer YOUR_API_KEY"

    Response:

    {
      "status": "success",
      "data": {
        "message": "Zone deletion initiated"
      }
    }
    Deletion is Permanent

    Zone deletion removes all DNS records and is irreversible. The API responds with 202 Accepted and processes deletion asynchronously.

    Get Zone Usage

    Retrieve query statistics for a specific zone:

    curl https://api.dnscale.eu/v1/zones/{zone_id}/usage \
      -H "Authorization: Bearer YOUR_API_KEY"

    Required scope: usage:read

    Response:

    {
      "status": "success",
      "data": {
        "zone_id": "zone_abc123",
        "zone_name": "example.com",
        "period": "current_month",
        "queries": 125000,
        "queries_by_type": {
          "A": 80000,
          "AAAA": 25000,
          "MX": 10000,
          "TXT": 10000
        }
      }
    }

    DNSSEC Management

    DNSSEC endpoints are nested under zones. See DNSSEC documentation for details.

    Endpoint reference
    MethodEndpointDescription
    GET/v1/zones/{zone_id}/dnssec/statusGet DNSSEC status
    PATCH/v1/zones/{zone_id}/dnssec/statusEnable/disable DNSSEC
    GET/v1/zones/{zone_id}/dnssec/cryptokeysList cryptographic keys
    GET/v1/zones/{zone_id}/dnssec/dsGet DS records for registrar

    Example: Complete Zone Setup

    Create a zone and add essential records:

    # 1. Create the zone
    ZONE_ID=$(curl -s -X POST https://api.dnscale.eu/v1/zones \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"name": "example.com"}' | jq -r '.data.id')
     
    # 2. Add A record for apex
    curl -X POST https://api.dnscale.eu/v1/zones/$ZONE_ID/records \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"name": "@", "type": "A", "content": "192.0.2.1", "ttl": 3600}'
     
    # 3. Add A record for www
    curl -X POST https://api.dnscale.eu/v1/zones/$ZONE_ID/records \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"name": "www", "type": "A", "content": "192.0.2.1", "ttl": 3600}'
     
    # 4. Add MX records
    curl -X POST https://api.dnscale.eu/v1/zones/$ZONE_ID/records \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"name": "@", "type": "MX", "content": "10 mail.example.com", "ttl": 3600}'
     
    # 5. Enable DNSSEC
    curl -X PATCH https://api.dnscale.eu/v1/zones/$ZONE_ID/dnssec/status \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"enabled": true}'