REST API – DNS

WEDOS REST API is still in development. Access and features may change without notice.

This article covers the DNS endpoint of WEDOS REST API. For WEDOS API (WAPI) see WAPI – WEDOS DNS.

For basic information anbout WEDOS REST API, consult the WEDOS REST API Manual.

In this article, you will find the following information:


DNS Endpoint Access

The WDNS HTTP REST API v2 is used to manage DNS domains and their DNS records in the WEDOS DNS (WDNS) service. The API follows REST principles and communicates via JSON.

Base URL and Authentication

The base URL for the DNS endpoints is: https://api.wedos.com/v2/dns

Authentication uses only an OAuth2 Bearer token, sent in the header Authorization: Bearer <TOKEN>. The token must have the wdns scope. Without a valid token, or with a token lacking the required scope, the API returns an authentication error.

Every endpoint supports the ?example=1 mode (or &example=1 if the URL already contains other query parameters). It returns a sample call (a curl command) for that endpoint without requiring real parameters. A valid Bearer token is required even in this mode.

Endpoint Overview

MethodEndpointDescription
GET/domainsList of the logged-in user’s domains, with search, filtering, sorting and paging
GET/domains/{domain}Domain detail
GET/domains/{domain}/axfr-tsigInformation about the domain’s AXFR TSIG key
GET/domains/{domain}/rowsList of the domain’s DNS records
GET/domains/{domain}/rows/{row_id}Detail of a single DNS record
POST/domains/addCreate a new domain
POST/domains/{domain}/commitApply the domain’s pending changes (commit)
POST/domains/{domain}/copyCreate a copy of the domain under a new name
POST/domains/{domain}/axfr-runStart an AXFR transfer immediately (secondary domain)
POST/domains/{domain}/axfr-tsigCreate or cancel the domain’s AXFR TSIG key
POST/domains/{domain}/rowsAdd a DNS record to the domain
POST/domains/{domain}/zone-importImport the domain’s DNS records (via AXFR or by pasting text in BIND format)
PATCH/domains/{domain}Modify domain settings
PATCH/domains/{domain}/rows/{row_id}Modify an existing DNS record
DELETE/domains/{domain}Delete a domain
DELETE/domains/{domain}/rows/{row_id}Delete a DNS record

Response format

All successful and error responses share the same JSON object shape with these keys: code (return code), msg (text description of the code), request_id (request identifier) and, optionally, data (response data, only if the operation returns any).


GET /domains

Returns the list of the logged-in user’s domains, with support for search, filtering, sorting and paging.

Parameters:

  • search – optional, string – search in the domain name (IDN supported)
  • status – optional, string – filter by domain status (e.g. active, disabled, deleted)
  • type – optional, string – filter by domain type (primary, secondary)
  • page – optional, integer – page number, default 1
  • page_limit – optional, integer – records per page, default 50
  • orderby – optional, string – sorting in the form column [ASC|DESC]; supported columns are domain and created_date; default is domain ASC. An invalid column is silently ignored and the default sorting is used.

Return codes:

  • 1000 – OK
  • 5001 – internal login error

Response data:

  • domain – array of domains; each item contains name, status, type
  • total – total number of domains matching the filter
  • page – current page
  • page_limit – records per page

Example:

curl -X GET -H 'Authorization: Bearer <TOKEN>' \
  'https://api.wedos.com/v2/dns/domains?search=domain1&status=active&page=1&page_limit=50'
{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b70",
  "data": {
    "domain": [
      {"name": "domain1.cz", "status": "active", "type": "primary"},
      {"name": "domain1.com", "status": "active", "type": "secondary"}
    ],
    "total": 2,
    "page": 1,
    "page_limit": 50
  }
}

GET /domains/{domain}

Returns detailed information about a domain.

Parameters:

  • domain – required, string (path) – domain name

Return codes:

  • 1000 – OK
  • 2100 – required parameter missing
  • 2101 – invalid input parameter
  • 2201 – unsupported TLD
  • 2202 – invalid domain name
  • 3222 – failed to open the domain (e.g. it does not exist)
  • 3223 – authorization error (the domain belongs to another user)
  • 3305 – domain is locked
  • 3306 – domain is deleted
  • 5001 – internal login error

Response data:

  • domain – object with domain details: name, status, type, tlock, autocommit, axfr_enabled, axfr_ips, changed, changed_date, commit_date, reload_pending, reload_pending_date, reload_date, disabled_date, enabled_date, add_date, rname, serial, refresh, retry, expire, minimum, rr_cnt, ns_out, ns

Example:

curl -X GET -H 'Authorization: Bearer <TOKEN>' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld'
{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b71",
  "data": {
    "domain": {
      "name": "domain1.tld",
      "status": "active",
      "type": "primary",
      "tlock": 0,
      "autocommit": 1,
      "axfr_enabled": 0,
      "axfr_ips": "",
      "changed": 0,
      "changed_date": null,
      "commit_date": "2026-09-30 12:00:00",
      "reload_pending": 0,
      "reload_pending_date": null,
      "reload_date": "2026-09-30 12:01:00",
      "disabled_date": null,
      "enabled_date": null,
      "add_date": "2026-01-15 09:30:00",
      "rname": "wedos.com",
      "serial": 2026093001,
      "refresh": 10800,
      "retry": 3600,
      "expire": 604800,
      "minimum": 3600,
      "rr_cnt": 12,
      "ns_out": 1,
      "ns": ["ns.wedos.cz", "ns.wedos.net", "ns.wedos.eu"]
    }
  }
}

GET /domains/{domain}/axfr-tsig

Returns information about the domain’s AXFR TSIG key (used to authenticate AXFR/IXFR DNS transfers). If TSIG is not set for the domain, the endpoint returns error 2334.

Parameters:

  • domain – required, string (path) – domain name

Return codes:

  • 1000 – OK
  • 2334 – AXFR TSIG is not set for the domain
  • 2337 – invalid AXFR TSIG command
  • 2340 – maximum number of domains in one bulk action exceeded
  • other error codes related to opening the domain – see GET /domains/{domain} (e.g. 3222, 3223, 3305, 3306)

Response data:

  • name – domain name
  • axfr_tsig_action – action performed, always info
  • axfr_tsig_name – TSIG key name
  • axfr_tsig_alg – TSIG key algorithm
  • axfr_tsig_key – TSIG key value (base64)

Example:

curl -X GET -H 'Authorization: Bearer <TOKEN>' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld/axfr-tsig'
{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b72",
  "data": {
    "name": "example.cz",
    "axfr_tsig_action": "info",
    "axfr_tsig_name": "domain1.tld.",
    "axfr_tsig_alg": "hmac-sha256",
    "axfr_tsig_key": "asdfghJKL1234567890."
  }
}

GET /domains/{domain}/rows

Returns the list of the domain’s DNS records. This operation cannot be performed for secondary domains (their records are managed by the primary server).

Parameters:

  • domain – required, string (path) – domain name

Return codes:

  • 1000 – OK
  • 2100 – required parameter missing
  • 2101 – invalid input parameter
  • 2201 – unsupported TLD
  • 2202 – invalid domain name
  • 2318 – operation cannot be performed on a secondary domain
  • 3222 – failed to open the domain
  • 3223 – authorization error
  • 3305 – domain is locked
  • 3306 – domain is deleted
  • 5001 – internal login error

Response data:

  • row – array of DNS records, each with the keys ID, name, ttl, rdtype, rdata, changed_date, author_comment

Example:

curl -X GET -H 'Authorization: Bearer <TOKEN>' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld/rows'
{
  "code": 1000,
  "msg": "OK",
  "request_id": "1d6e8a5f3b73",
  "data": {
    "row": [
      {
        "ID": 123,
        "name": "www",
        "ttl": 1800,
        "rdtype": "A",
        "rdata": "46.28.105.2",
        "changed_date": "2026-09-30 12:00:00",
        "author_comment": "production server"
      },
      {
        "ID": 124,
        "name": "",
        "ttl": 3600,
        "rdtype": "MX",
        "rdata": "10 mail.wedos.com.",
        "changed_date": "2026-09-30 12:00:00",
        "author_comment": ""
      }
    ]
  }
}

GET /domains/{domain}/rows/{row_id}

Returns the detail of a single DNS record of the domain.

Parameters:

  • domain – required, string (path) – domain name
  • row_id – required, integer (path) – DNS record ID

Return codes:

  • 1000 – OK
  • 2100 – required parameter missing
  • 2101 – invalid input parameter
  • 2201 – unsupported TLD
  • 2202 – invalid domain name
  • 2318 – operation cannot be performed on a secondary domain
  • 3222 – failed to open the domain
  • 3223 – authorization error
  • 3305 – domain is locked
  • 3306 – domain is deleted
  • 3309 – record with this ID does not exist
  • 5001 – internal login error

Response data:

  • row – object with record details: ID, name, ttl, rdtype, rdata, changed_date, author_comment

Example:

curl -X GET -H 'Authorization: Bearer <TOKEN>' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld/rows/123'
{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2",
  "data": {
    "row": {
      "ID": 123,
      "name": "www",
      "ttl": 1800,
      "rdtype": "A",
      "rdata": "46.28.105.2",
      "changed_date": "2026-09-30 12:00:00",
      "author_comment": "production server"
    }
  }
}

POST /domains/add

Creates a new domain in WDNS, either as a primary domain (DNS records are managed by WEDOS) or as a secondary domain (records are transferred via AXFR from an external primary server).

Parameters:

  • name – required, string – domain name
  • type – optional, string – primary or secondary, default primary
  • axfr_enabled – optional, boolean (0/1) – outgoing AXFR allowed, default 0
  • axfr_ips – optional, string or array of strings – IP addresses allowed for outgoing AXFR (a string of space-separated addresses, or a JSON array of addresses); required if axfr_enabled=1
  • primary_ip – optional (required for type=secondary), string – IPv4 address of the primary server the records are transferred from
  • primary_tsig_enabled – optional, boolean – requires TSIG authentication of incoming AXFR (only for type=secondary)
  • primary_tsig_name – optional (required when primary_tsig_enabled=1), string – TSIG key name
  • primary_tsig_alg – optional (required when primary_tsig_enabled=1), string – TSIG key algorithm; supported values: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512
  • primary_tsig_key – optional (required when primary_tsig_enabled=1), string – base64-encoded TSIG key value (minimum decoded key length 8 bytes)
  • template_id – optional, integer – ID of the template used to create the domain; applies only to type=primary

Return codes:

  • 1000 – OK
  • 2100 – required parameter missing
  • 2101 – invalid input parameter
  • 2201 – unsupported TLD
  • 2202 – invalid domain name
  • 2301 – invalid format of type
  • 2302 – parameter primary_ip missing
  • 2303 – invalid format of primary_ip
  • 2304 – invalid format of axfr_enabled
  • 2305 – required parameter axfr_ips missing
  • 2306 – invalid format of axfr_ips
  • 2322 – WDNS domain limit for this account exceeded
  • 2323 – template not found
  • 2324 – template can only be used to create a primary domain
  • 2325 – no template defined
  • 2330–2333 – invalid TSIG configuration (overall, name, algorithm, key)
  • 2355 – AXFR IP address is not valid
  • 2366 – axfr_ips string is longer than 255 characters
  • 2367 – no IP address given for outgoing AXFR
  • 3302 – adding the domain to WDNS failed
  • 3303 – domain already exists in WDNS
  • 5001 – internal authorization error

Response data:

  • domain_id – internal ID of the newly created domain
  • name – domain name

Example:

curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
  'https://api.wedos.com/v2/dns/domains/add' \
  --data '{"name":"domain1.tld","type":"primary"}'

Request body:

{
  "name": "domain1.tld",
  "type": "primary"
}

Response:

{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b75",
  "data": {
    "domain_id": 48213,
    "name": "domain1.tld"
  }
}

POST /domains/{domain}/commit

Applies the domain’s pending changes (commit), propagating them to the production DNS servers.

Parameters:

  • domain – required, string (path) – domain name

Return codes:

  • 1000 – OK
  • 2100 – required parameter missing
  • 2101 – invalid input parameter
  • 2201 – unsupported TLD
  • 2202 – invalid domain name
  • 3222 – failed to open the domain
  • 3223 – authorization error
  • 3305 – domain is locked
  • 3306 – domain is deleted
  • 5001 – internal authorization error

Response data: The endpoint returns no data; success is indicated by code 1000.

Example:

curl -X POST -H 'Authorization: Bearer <TOKEN>' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld/commit'
{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b76"
}

POST /domains/{domain}/copy

Creates a copy of an existing domain (including its DNS records) under a new name.

Parameters:

  • domain – required, string (path) – source domain name
  • name_new – required, string (request body) – name of the new domain

Return codes:

  • 1000 – OK
  • 2100 – required parameter missing
  • 2101 – invalid input parameter
  • 2201 – unsupported TLD
  • 2202 – invalid domain name
  • 2320 – invalid or unsupported new domain name
  • 2321 – unsupported TLD of the new domain name
  • 2322 – DNS record limit per user exceeded
  • 3222 – failed to open the domain
  • 3223 – authorization error
  • 3305 – domain is locked
  • 3306 – domain is deleted
  • 3311 – copying failed
  • 3312 – a domain with this name already exists
  • 5001 – internal authorization error

Response data: The endpoint returns no data; success is indicated by code 1000.

Example:

curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld/copy' \
  --data '{"name_new":"domain2.tld"}'

Request body:

{
  "name_new": "domain2.tld"
}

Response:

{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b77"
}

POST /domains/{domain}/axfr-run

Immediately starts an AXFR transfer of DNS records for a secondary domain (outside the regular schedule).

Parameters:

  • domain – required, string (path) – domain name

Return codes:

  • 1000 – OK
  • 2100 – required parameter missing
  • 2101 – invalid input parameter
  • 2201 – unsupported TLD
  • 2202 – invalid domain name
  • 2319 – can only be performed on a secondary domain
  • 3222 – failed to open the domain
  • 3223 – authorization error
  • 3305 – domain is locked
  • 3306 – domain is deleted
  • 5001 – internal authorization error

Response data:

  • next_run – time of the next scheduled update

Example:

curl -X POST -H 'Authorization: Bearer <TOKEN>' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld/axfr-run'
{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b78",
  "data": {
    "next_run": "2026-10-01 09:15:00"
  }
}

POST /domains/{domain}/axfr-tsig

Creates or cancels the domain’s AXFR TSIG key (authentication of outgoing AXFR/IXFR transfers).

Parameters:

  • domain – required, string (path) – domain name
  • action – optional, string (request body) – create (create/update) or cancel, default create; the value is internally mapped to the WAPI parameter axfr_tsig_action

Return codes:

  • 1000 – OK
  • 2335 – AXFR TSIG was not created for the domain
  • 2336 – AXFR TSIG was not cancelled for the domain
  • 2337 – invalid AXFR TSIG command
  • 2340 – maximum number of domains in one bulk action exceeded
  • other error codes related to opening the domain – see GET /domains/{domain} (e.g. 3222, 3223, 3305, 3306)

Response data:

  • name – domain name
  • axfr_tsig_action – action performed (create/cancel)
  • axfr_tsig_name – TSIG key name (only for create)
  • axfr_tsig_alg – TSIG key algorithm (only for create)
  • axfr_tsig_key – TSIG key value, base64 (only for create)

Example:

curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld/axfr-tsig' \
  --data '{"action":"create"}'

Request body:

{
  "action": "create"
}

Response:

{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b79",
  "data": {
    "name": "example.cz",
    "axfr_tsig_action": "create",
    "axfr_tsig_name": "example.cz.",
    "axfr_tsig_alg": "hmac-sha256",
    "axfr_tsig_key": "asdfghJKL1234567890"
  }
}

POST /domains/{domain}/rows

Adds a new DNS record to the domain.

Parameters:

  • domain – required, string (path) – domain name
  • name – required, string (request body) – record name; an empty string means a record at the domain level itself (apex)
  • ttl – required, integer (request body) – record TTL in seconds, non-zero value
  • type – required, string (request body) – record type; supported values: A, AAAA, ALIAS, CAA, CNAME, DNAME, HTTPS, MX, NAPTR, NS, SRV, SSHFP, TLSA, TXT
  • rdata – required, string (request body) – record data (format depends on the record type)
  • author_comment – optional, string (request body) – author’s comment; only letters without diacritics, digits and spaces are allowed; older clients may send auth_comment instead (an equivalent alias)

Return codes:

  • 1000 – OK
  • 2100 – required parameter missing
  • 2101 – invalid input parameter
  • 2201 – unsupported TLD
  • 2202 – invalid domain name
  • 2298 – parameter author_comment contains invalid characters
  • 2309 – invalid record type
  • 2310 – cannot add another record to the domain (record limit reached)
  • 2311 – invalid record name
  • 2312 – invalid name for the given record type
  • 2313 – invalid CNAME for this name
  • 2314 – invalid record data
  • 2315 – invalid TLD
  • 2316 – this record already exists
  • 2317 – invalid TTL
  • 2318 – operation cannot be performed on a secondary domain
  • 3222 – failed to open the domain
  • 3223 – authorization error
  • 3305 – domain is locked
  • 3306 – domain is deleted
  • 3307 – failed to add the domain record
  • 5001 – internal authorization error

Response data:

  • domain – domain name
  • row_id – ID of the newly created record

Example:

curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld/rows' \
  --data '{"name":"www","ttl":1800,"type":"A","rdata":"46.28.105.2"}'

Request body:

{
  "name": "www",
  "ttl": 1800,
  "type": "A",
  "rdata": "46.28.105.2"
}

Response:

{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b80",
  "data": {
    "domain": "domain1.tld",
    "row_id": 125
  }
}

POST /domains/{domain}/zone-import

Imports the domain’s DNS records. Two modes (import_type) are supported:

  • axfr – the endpoint tries to download records via AXFR from the given IP address and returns them as text in BIND format for manual review. This call does not import the records automatically. To import them, copy them and send them in a separate call with import_type=text.
  • text – records passed in BIND format in the rows parameter are validated and imported directly into the domain.

Import is possible only for a primary domain.

Parameters:

  • domain – required, string (path) – domain name
  • import_type – required, string (request body) – axfr or text
  • axfr_ip – required for import_type=axfr, string (request body) – IPv4 address of the DNS server to download records from via AXFR
  • rows – required for import_type=text, string (request body) – DNS records as text in BIND format (not a JSON array, but a single multi-line string)

Return codes:

  • 1000 – OK
  • 2338 – you do not have permission to edit this domain
  • 2350 – invalid import type value
  • 2351 – DNS record list missing (rows not given with import_type=text)
  • 2352 – no data for import could be obtained from the given IP
  • 2353 – the imported DNS list contains an invalid record; import was not performed
  • 2354 – AXFR IP address missing
  • 2355 – AXFR IP address is not valid
  • 2357 – no data for import could be obtained from the text
  • 2358 – cannot import 2 identical records (name, type, data)
  • 2359 – maximum number of records exceeded
  • 2360 – cannot import a CNAME record if any other record exists for its name
  • 2363 – records of the same type must have the same TTL
  • 2364 – DNS records were not imported (internal import error)
  • 2365 – AXFR IP address must be in IPv4 format
  • 2368 – import is allowed only for a primary domain

Response data:

  • for import_type=axfr: name, import_type, axfr_ip, desc (descriptive note), rows (downloaded records in BIND format, framed by --- BEGIN ---/--- END ---, intended to be copied into a follow-up call with import_type=text)
  • for import_type=text (successful import): name, import_type, source_rows (input text), imported_rows (records actually imported, in BIND format)

Example:

curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld/zone-import' \
  --data '{"import_type":"text","rows":"www IN A 46.28.105.2\nmail IN A 46.28.105.3"}'

Request body:

{
  "import_type": "text",
  "rows": "www IN A 46.28.105.2\nmail IN A 46.28.105.3"
}

Response:

{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b81",
  "data": {
    "name": "example.cz",
    "import_type": "text",
    "source_rows": "\n--- BEGIN ---\nwww IN A 46.28.105.2\nmail IN A 46.28.105.3\n--- END ---",
    "imported_rows": "\n--- BEGIN ---\nwww 3600 IN A 46.28.105.2\nmail 3600 IN A 46.28.105.3\n--- END ---"
  }
}

PATCH /domains/{domain}

Modifies the settings of an existing domain (AXFR and TSIG parameters). The domain’s name and type cannot be changed with this operation.

Parameters:

  • domain – required, string (path) – domain name
  • axfr_enabled – optional, boolean (0/1) – outgoing AXFR allowed
  • axfr_ips – optional, string or array of strings – IP addresses allowed for outgoing AXFR (a string of space-separated addresses, or a JSON array of addresses); required when setting axfr_enabled=1
  • primary_ip – optional, string – IPv4 address of the primary server (secondary domain only)
  • primary_tsig_enabled – optional, boolean – requires TSIG authentication of incoming AXFR (secondary domain only)
  • primary_tsig_name – optional, string – TSIG key name
  • primary_tsig_alg – optional, string – TSIG key algorithm (hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384, hmac-sha512)
  • primary_tsig_key – optional, string – TSIG key value, base64

Return codes:

  • 1000 – OK
  • 2007 – maximum request size exceeded
  • 2100 – input parameter missing
  • 2101 – invalid input parameters
  • 2201 – unsupported TLD
  • 2202 – invalid or unsupported domain name
  • 2303 – invalid format of primary_ip
  • 2304 – invalid format of axfr_enabled
  • 2305 – required parameter axfr_ips missing
  • 2306 – invalid format of axfr_ips
  • 2330–2333 – invalid TSIG configuration (overall, name, algorithm, key)
  • 3222 – failed to open the domain
  • 3223 – authorization error
  • 3304 – updating the domain record failed
  • 3305 – domain is locked
  • 3306 – domain is deleted
  • 5001 – internal authentication error

Response data: The endpoint returns no data; success is indicated by code 1000.

Example:

curl -X PATCH -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld' \
  --data '{"axfr_enabled":1,"axfr_ips":"46.28.105.2 46.28.105.3"}'

Request body:

{
  "axfr_enabled": 1,
  "axfr_ips": "46.28.105.2 46.28.105.3"
}

Response:

{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b82"
}

PATCH /domains/{domain}/rows/{row_id}

Modifies an existing DNS record. The record’s name and type cannot be changed with this operation; to change them, delete the original record and add a new one.

Parameters:

  • domain – required, string (path) – domain name
  • row_id – required, integer (path) – DNS record ID
  • ttl – required, integer (request body) – new TTL value in seconds
  • rdata – required, string (request body) – new record data
  • author_comment – optional, string (request body) – author’s comment; only letters without diacritics, digits and spaces are allowed; older clients may send auth_comment instead

Return codes:

  • 1000 – OK
  • 2100 – required parameter missing
  • 2101 – invalid input parameter
  • 2201 – unsupported TLD
  • 2202 – invalid domain name
  • 2298 – parameter author_comment contains invalid characters
  • 2314 – invalid record data
  • 2316 – this record already exists
  • 2317 – invalid TTL
  • 2318 – operation cannot be performed on a secondary domain
  • 3222 – failed to open the domain
  • 3223 – authorization error
  • 3305 – domain is locked
  • 3306 – domain is deleted
  • 3309 – record with this ID does not exist
  • 3310 – modifying the record failed
  • 5001 – internal authorization error

Response data: The endpoint returns no data; success is indicated by code 1000.

Example:

curl -X PATCH -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld/rows/123' \
  --data '{"ttl":3600,"rdata":"46.28.105.3"}'

Request body:

{
  "ttl": 3600,
  "rdata": "46.28.105.3"
}

Response:

{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b83"
}

DELETE /domains/{domain}

Deletes the domain from WDNS.

Parameters:

  • domain – required, string (path) – domain name

Return codes:

  • 1000 – OK
  • 2100 – required parameter missing
  • 2101 – invalid input parameter
  • 2201 – unsupported TLD
  • 2202 – invalid or unsupported domain name
  • 3222 – failed to open the domain
  • 3223 – access denied
  • 3301 – failed to remove the domain record
  • 3305 – domain is locked
  • 3306 – domain is already deleted
  • 5001 – internal authorization error

Response data: The endpoint returns no data; success is indicated by code 1000.

Example:

curl -X DELETE -H 'Authorization: Bearer <TOKEN>' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld'
{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b84"
}

DELETE /domains/{domain}/rows/{row_id}

Deletes a DNS record of the domain.

Parameters:

  • domain – required, string (path) – domain name
  • row_id – required, integer (path) – DNS record ID

Return codes:

  • 1000 – OK
  • 2100 – required parameter missing
  • 2101 – invalid input parameter
  • 2201 – unsupported TLD
  • 2202 – invalid or unsupported domain name
  • 2318 – operation cannot be performed on a secondary domain
  • 3222 – failed to open the domain
  • 3223 – access denied
  • 3305 – domain is locked
  • 3306 – domain is deleted
  • 3308 – deleting the record failed
  • 3309 – record with this ID does not exist
  • 5001 – internal authorization error

Response data: The endpoint returns no data; success is indicated by code 1000.

Example:

curl -X DELETE -H 'Authorization: Bearer <TOKEN>' \
  'https://api.wedos.com/v2/dns/domains/domain1.tld/rows/123'
{
  "code": 1000,
  "msg": "OK",
  "request_id": "f3a9c1e2-7b44-4e21-9c2a-1d6e8a5f3b85"
}

Notes

  • Besides the error codes listed for each endpoint, general REST-layer errors common to all endpoints may occur: 2000 (OAuth2 Bearer token missing or invalid), 2004 (maximum request size exceeded – URL/query string or request body), 4000 (unknown/unsupported combination of URL path and HTTP method), 4001 (input validation failed), 4005 (no example defined for this endpoint in ?example=1 mode) and 6000 (internal WAPI layer initialization error). For PATCH/DELETE methods, if the {domain} segment is missing from the URL, error 6001 is returned (required parameter domain missing).
  • An unrecognized combination of URL segments (e.g. /domains/{domain}/rows without {row_id} for PATCH/DELETE) always returns 4000. It never silently falls through to another operation (e.g. to the whole-domain level).
  • The REST layer accepts axfr_ips either as a string of space-separated IP addresses or as a JSON array of addresses. Before calling the underlying WAPI command, it normalizes both variants into an internal format. An empty string is treated as no value.
  • The primary_ip and primary_tsig_* parameters take effect only for domains of type secondary.
  • template_id when creating a domain (POST /domains/add) applies only to a primary domain (type=primary or not specified). For a secondary domain it returns error 2324.
  • rr_limit (maximum number of DNS records for a domain) is not a supported parameter of POST /domains/add. The endpoint does not accept it; the limit is governed by the account/template.
  • For POST /domains/{domain}/zone-import, it is important to distinguish the two import_type modes: axfr only downloads the records and returns them as text for manual review (nothing is imported), while text writes the records to the domain directly after validation. The typical workflow is therefore to call import_type=axfr first, review the returned text, and only then send it as import_type=text.
  • author_comment (when adding/modifying a DNS record) allows only letters without diacritics, digits and spaces. Older clients may use the auth_comment parameter with the same meaning instead.
  • The name and type of a DNS record cannot be changed via PATCH /domains/{domain}/rows/{row_id}. To change them, delete the record and add it again.
  • Domain ownership is verified within each operation based on the logged-in user (identified from the OAuth2 token). If the domain belongs to another user, error 3223 is returned.

Was this helpful?

Thanks for your feedback!
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors