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: records:read, records:write

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

    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 '{
        "content": "192.0.2.2",
        "ttl": 300
      }'

    Updatable Fields:

    FieldTypeDescription
    contentstringNew record value
    ttlintegerNew TTL in seconds
    disabledbooleanEnable/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