Records

    Create, update, and delete DNS records within zones.

    Overview

    DNS records define how your domain responds to queries. DNScale supports all standard record types plus modern types like HTTPS and SVCB.

    Required scopes: zones:read + records:read (read), zones:read + records:write (write).

    Record routes are nested under /v1/zones/{zone_id}/records, so every record operation also requires zones:read to look up the parent zone. A key with only records:* will return 403.

    Endpoints

    MethodEndpointDescription
    POST/v1/zones/{zone_id}/recordsCreate a record
    GET/v1/zones/{zone_id}/recordsList all records
    GET/v1/zones/{zone_id}/records/{record_id}Get a record
    PUT/v1/zones/{zone_id}/records/{record_id}Update a record
    PUT/v1/zones/{zone_id}/records/by-name/{name}/{type}Update by name/type
    DELETE/v1/zones/{zone_id}/records/{record_id}Delete a record
    DELETE/v1/zones/{zone_id}/records/by-name/{name}/{type}Delete by name/type

    Supported Record Types

    DNScale supports 14 record types:

    TypeDescriptionDocumentation
    AIPv4 addressA Record Guide
    AAAAIPv6 addressAAAA Record Guide
    CNAMECanonical name (alias)CNAME Guide
    MXMail exchangeMX Record Guide
    TXTText data (SPF, DKIM, etc.)TXT Record Guide
    NSNameserver delegationNS Record Guide
    SRVService locationSRV Record Guide
    PTRReverse DNSPTR Record Guide
    CAACertificate authority authorizationCAA Record Guide
    TLSATLS certificate association (DANE)TLSA Record Guide
    SSHFPSSH fingerprintSSHFP Record Guide
    HTTPSHTTPS service bindingHTTPS Record Guide
    SVCBGeneral service bindingSVCB Record Guide
    ALIASCNAME-like at apexALIAS Record Guide

    Create a Record

    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
      }'

    Request Body:

    FieldTypeRequiredDescription
    namestringYesRecord name (@ for apex, or subdomain)
    typestringYesRecord type (A, AAAA, CNAME, etc.)
    contentstringYesRecord value
    ttlintegerNoTime to live in seconds (default: zone TTL)
    disabledbooleanNoWhether record is disabled (default: false)

    Response:

    {
      "status": "success",
      "data": {
        "message": "Record created successfully",
        "record": {
          "id": "rec_abc123",
          "name": "www.example.com.",
          "type": "A",
          "content": "192.0.2.1",
          "ttl": 3600,
          "disabled": false
        }
      }
    }

    Record Type Examples

    A Record (IPv4)

    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
      }'

    AAAA Record (IPv6)

    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": "AAAA",
        "content": "2001:db8::1",
        "ttl": 3600
      }'

    CNAME Record

    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": "CNAME",
        "content": "example.com",
        "ttl": 3600
      }'

    MX Record

    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
      }'

    TXT Record (SPF)

    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": "TXT",
        "content": "v=spf1 include:_spf.google.com ~all",
        "ttl": 3600
      }'

    SRV Record

    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": "_sip._tcp",
        "type": "SRV",
        "content": "10 5 5060 sip.example.com",
        "ttl": 3600
      }'

    CAA Record

    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": "CAA",
        "content": "0 issue \"letsencrypt.org\"",
        "ttl": 3600
      }'

    HTTPS Record

    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": "HTTPS",
        "content": "1 . alpn=\"h3,h2\"",
        "ttl": 3600
      }'

    ALIAS Record

    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": "ALIAS",
        "content": "myapp.herokuapp.com",
        "ttl": 3600
      }'

    List Records

    Retrieve all records in a zone:

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

    Query Parameters:

    ParameterDefaultDescription
    limit10Records per page (max: 100)
    offset0Records to skip

    Response:

    {
      "status": "success",
      "data": {
        "items": [
          {
            "id": "rec_abc123",
            "name": "example.com.",
            "type": "A",
            "content": "192.0.2.1",
            "ttl": 3600
          },
          {
            "id": "rec_def456",
            "name": "www.example.com.",
            "type": "CNAME",
            "content": "example.com.",
            "ttl": 3600
          }
        ],
        "total": 15,
        "limit": 100,
        "offset": 0
      }
    }

    Get a Record

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

    Update a Record

    By Record ID

    curl -X PUT https://api.dnscale.eu/v1/zones/{zone_id}/records/{record_id} \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "www",
        "type": "A",
        "content": "192.0.2.2",
        "ttl": 300
      }'

    The name and type in the body must match the record_id; mismatches return 400.

    Request Body:

    FieldTypeRequiredDescription
    namestringYesRecord name (must match record_id)
    typestringYesRecord type (must match record_id)
    contentstringYesNew record value
    ttlintegerYesNew TTL in seconds
    disabledbooleanNoEnable/disable the record

    Note: Record IDs are derived from name, type, and content, so updating content returns a record with a new ID. To update a record without tracking its ID, use the by-name endpoint below.

    By Name and Type

    Useful when you want to rotate a record's content without first looking up its ID:

    curl -X PUT "https://api.dnscale.eu/v1/zones/{zone_id}/records/by-name/www/A" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "content": "192.0.2.2",
        "ttl": 300
      }'

    For multi-value record types (A, AAAA, MX, NS, TXT, SRV, CAA, TLSA, SSHFP, HTTPS, SVCB), append ?content= to identify which value to update:

    curl -X PUT "https://api.dnscale.eu/v1/zones/{zone_id}/records/by-name/www/A?content=192.0.2.1" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "content": "192.0.2.5",
        "ttl": 300
      }'

    Request Body:

    FieldTypeRequiredDescription
    contentstringYesNew record value
    ttlintegerYesNew TTL in seconds
    disabledbooleanNoEnable/disable the record

    Delete a Record

    By Record ID

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

    By Name and Type

    Useful for deleting records when you know the name and type but not the ID:

    curl -X DELETE "https://api.dnscale.eu/v1/zones/{zone_id}/records/by-name/_acme-challenge/TXT" \
      -H "Authorization: Bearer YOUR_API_KEY"

    For multi-value records, append ?content= to delete a specific value:

    curl -X DELETE "https://api.dnscale.eu/v1/zones/{zone_id}/records/by-name/www/A?content=192.0.2.1" \
      -H "Authorization: Bearer YOUR_API_KEY"

    Multi-Value Records

    Some record types support multiple values (e.g., multiple A records for round-robin):

    # Add first A record
    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": 300}'
     
    # Add second A record (same name, same type)
    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.2", "ttl": 300}'

    Multi-value record types: A, AAAA, MX, NS, TXT, SRV, CAA, TLSA, SSHFP, HTTPS, SVCB

    Single-value record types: CNAME, ALIAS

    ACME DNS-01 Challenge Example

    Automate Let's Encrypt certificate validation:

    # Create challenge record
    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": "_acme-challenge",
        "type": "TXT",
        "content": "validation-token-from-acme-server",
        "ttl": 60
      }'
     
    # After validation, clean up
    curl -X DELETE "https://api.dnscale.eu/v1/zones/{zone_id}/records/by-name/_acme-challenge/TXT" \
      -H "Authorization: Bearer YOUR_API_KEY"

    Common Errors

    ErrorCauseSolution
    record_already_existsDuplicate single-value recordDelete existing record first
    invalid_record_contentMalformed record valueCheck content format for the record type
    cname_conflictCNAME with other records at same nameCNAME must be the only record at a name
    zone_not_foundInvalid zone IDVerify zone exists and you have access