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
- DNS Endpoint details:
- GET /domains
- GET /domains/{domain}
- GET /domains/{domain}/axfr-tsig
- GET /domains/{domain}/rows
- GET /domains/{domain}/rows/{row_id}
- POST /domains/add
- POST /domains/{domain}/commit
- POST /domains/{domain}/copy
- POST /domains/{domain}/axfr-run
- POST /domains/{domain}/axfr-tsig
- POST /domains/{domain}/rows
- POST /domains/{domain}/zone-import
- PATCH /domains/{domain}
- PATCH /domains/{domain}/rows/{row_id}
- DELETE /domains/{domain}
- DELETE /domains/{domain}/rows/{row_id}
- Notes
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
| Method | Endpoint | Description |
|---|---|---|
| GET | /domains | List of the logged-in user’s domains, with search, filtering, sorting and paging |
| GET | /domains/{domain} | Domain detail |
| GET | /domains/{domain}/axfr-tsig | Information about the domain’s AXFR TSIG key |
| GET | /domains/{domain}/rows | List of the domain’s DNS records |
| GET | /domains/{domain}/rows/{row_id} | Detail of a single DNS record |
| POST | /domains/add | Create a new domain |
| POST | /domains/{domain}/commit | Apply the domain’s pending changes (commit) |
| POST | /domains/{domain}/copy | Create a copy of the domain under a new name |
| POST | /domains/{domain}/axfr-run | Start an AXFR transfer immediately (secondary domain) |
| POST | /domains/{domain}/axfr-tsig | Create or cancel the domain’s AXFR TSIG key |
| POST | /domains/{domain}/rows | Add a DNS record to the domain |
| POST | /domains/{domain}/zone-import | Import 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 1page_limit– optional, integer – records per page, default 50orderby– optional, string – sorting in the formcolumn [ASC|DESC]; supported columns aredomainandcreated_date; default isdomain ASC. An invalid column is silently ignored and the default sorting is used.
Return codes:
1000– OK5001– internal login error
Response data:
domain– array of domains; each item containsname,status,typetotal– total number of domains matching the filterpage– current pagepage_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– OK2100– required parameter missing2101– invalid input parameter2201– unsupported TLD2202– invalid domain name3222– failed to open the domain (e.g. it does not exist)3223– authorization error (the domain belongs to another user)3305– domain is locked3306– domain is deleted5001– 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– OK2334– AXFR TSIG is not set for the domain2337– invalid AXFR TSIG command2340– 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 nameaxfr_tsig_action– action performed, alwaysinfoaxfr_tsig_name– TSIG key nameaxfr_tsig_alg– TSIG key algorithmaxfr_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– OK2100– required parameter missing2101– invalid input parameter2201– unsupported TLD2202– invalid domain name2318– operation cannot be performed on a secondary domain3222– failed to open the domain3223– authorization error3305– domain is locked3306– domain is deleted5001– internal login error
Response data:
row– array of DNS records, each with the keysID,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 namerow_id– required, integer (path) – DNS record ID
Return codes:
1000– OK2100– required parameter missing2101– invalid input parameter2201– unsupported TLD2202– invalid domain name2318– operation cannot be performed on a secondary domain3222– failed to open the domain3223– authorization error3305– domain is locked3306– domain is deleted3309– record with this ID does not exist5001– 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 nametype– optional, string –primaryorsecondary, defaultprimaryaxfr_enabled– optional, boolean (0/1) – outgoing AXFR allowed, default 0axfr_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 ifaxfr_enabled=1primary_ip– optional (required fortype=secondary), string – IPv4 address of the primary server the records are transferred fromprimary_tsig_enabled– optional, boolean – requires TSIG authentication of incoming AXFR (only fortype=secondary)primary_tsig_name– optional (required whenprimary_tsig_enabled=1), string – TSIG key nameprimary_tsig_alg– optional (required whenprimary_tsig_enabled=1), string – TSIG key algorithm; supported values:hmac-md5,hmac-sha1,hmac-sha224,hmac-sha256,hmac-sha384,hmac-sha512primary_tsig_key– optional (required whenprimary_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 totype=primary
Return codes:
1000– OK2100– required parameter missing2101– invalid input parameter2201– unsupported TLD2202– invalid domain name2301– invalid format oftype2302– parameterprimary_ipmissing2303– invalid format ofprimary_ip2304– invalid format ofaxfr_enabled2305– required parameteraxfr_ipsmissing2306– invalid format ofaxfr_ips2322– WDNS domain limit for this account exceeded2323– template not found2324– template can only be used to create a primary domain2325– no template defined2330–2333– invalid TSIG configuration (overall, name, algorithm, key)2355– AXFR IP address is not valid2366–axfr_ipsstring is longer than 255 characters2367– no IP address given for outgoing AXFR3302– adding the domain to WDNS failed3303– domain already exists in WDNS5001– internal authorization error
Response data:
domain_id– internal ID of the newly created domainname– 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– OK2100– required parameter missing2101– invalid input parameter2201– unsupported TLD2202– invalid domain name3222– failed to open the domain3223– authorization error3305– domain is locked3306– domain is deleted5001– 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 namename_new– required, string (request body) – name of the new domain
Return codes:
1000– OK2100– required parameter missing2101– invalid input parameter2201– unsupported TLD2202– invalid domain name2320– invalid or unsupported new domain name2321– unsupported TLD of the new domain name2322– DNS record limit per user exceeded3222– failed to open the domain3223– authorization error3305– domain is locked3306– domain is deleted3311– copying failed3312– a domain with this name already exists5001– 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– OK2100– required parameter missing2101– invalid input parameter2201– unsupported TLD2202– invalid domain name2319– can only be performed on a secondary domain3222– failed to open the domain3223– authorization error3305– domain is locked3306– domain is deleted5001– 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 nameaction– optional, string (request body) –create(create/update) orcancel, defaultcreate; the value is internally mapped to the WAPI parameteraxfr_tsig_action
Return codes:
1000– OK2335– AXFR TSIG was not created for the domain2336– AXFR TSIG was not cancelled for the domain2337– invalid AXFR TSIG command2340– 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 nameaxfr_tsig_action– action performed (create/cancel)axfr_tsig_name– TSIG key name (only forcreate)axfr_tsig_alg– TSIG key algorithm (only forcreate)axfr_tsig_key– TSIG key value, base64 (only forcreate)
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 namename– 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 valuetype– required, string (request body) – record type; supported values:A,AAAA,ALIAS,CAA,CNAME,DNAME,HTTPS,MX,NAPTR,NS,SRV,SSHFP,TLSA,TXTrdata– 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 sendauth_commentinstead (an equivalent alias)
Return codes:
1000– OK2100– required parameter missing2101– invalid input parameter2201– unsupported TLD2202– invalid domain name2298– parameterauthor_commentcontains invalid characters2309– invalid record type2310– cannot add another record to the domain (record limit reached)2311– invalid record name2312– invalid name for the given record type2313– invalid CNAME for this name2314– invalid record data2315– invalid TLD2316– this record already exists2317– invalid TTL2318– operation cannot be performed on a secondary domain3222– failed to open the domain3223– authorization error3305– domain is locked3306– domain is deleted3307– failed to add the domain record5001– internal authorization error
Response data:
domain– domain namerow_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 withimport_type=text.text– records passed in BIND format in therowsparameter are validated and imported directly into the domain.
Import is possible only for a primary domain.
Parameters:
domain– required, string (path) – domain nameimport_type– required, string (request body) –axfrortextaxfr_ip– required forimport_type=axfr, string (request body) – IPv4 address of the DNS server to download records from via AXFRrows– required forimport_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– OK2338– you do not have permission to edit this domain2350– invalid import type value2351– DNS record list missing (rowsnot given withimport_type=text)2352– no data for import could be obtained from the given IP2353– the imported DNS list contains an invalid record; import was not performed2354– AXFR IP address missing2355– AXFR IP address is not valid2357– no data for import could be obtained from the text2358– cannot import 2 identical records (name, type, data)2359– maximum number of records exceeded2360– cannot import a CNAME record if any other record exists for its name2363– records of the same type must have the same TTL2364– DNS records were not imported (internal import error)2365– AXFR IP address must be in IPv4 format2368– 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 withimport_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 nameaxfr_enabled– optional, boolean (0/1) – outgoing AXFR allowedaxfr_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 settingaxfr_enabled=1primary_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 nameprimary_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– OK2007– maximum request size exceeded2100– input parameter missing2101– invalid input parameters2201– unsupported TLD2202– invalid or unsupported domain name2303– invalid format ofprimary_ip2304– invalid format ofaxfr_enabled2305– required parameteraxfr_ipsmissing2306– invalid format ofaxfr_ips2330–2333– invalid TSIG configuration (overall, name, algorithm, key)3222– failed to open the domain3223– authorization error3304– updating the domain record failed3305– domain is locked3306– domain is deleted5001– 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 namerow_id– required, integer (path) – DNS record IDttl– required, integer (request body) – new TTL value in secondsrdata– required, string (request body) – new record dataauthor_comment– optional, string (request body) – author’s comment; only letters without diacritics, digits and spaces are allowed; older clients may sendauth_commentinstead
Return codes:
1000– OK2100– required parameter missing2101– invalid input parameter2201– unsupported TLD2202– invalid domain name2298– parameterauthor_commentcontains invalid characters2314– invalid record data2316– this record already exists2317– invalid TTL2318– operation cannot be performed on a secondary domain3222– failed to open the domain3223– authorization error3305– domain is locked3306– domain is deleted3309– record with this ID does not exist3310– modifying the record failed5001– 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– OK2100– required parameter missing2101– invalid input parameter2201– unsupported TLD2202– invalid or unsupported domain name3222– failed to open the domain3223– access denied3301– failed to remove the domain record3305– domain is locked3306– domain is already deleted5001– 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 namerow_id– required, integer (path) – DNS record ID
Return codes:
1000– OK2100– required parameter missing2101– invalid input parameter2201– unsupported TLD2202– invalid or unsupported domain name2318– operation cannot be performed on a secondary domain3222– failed to open the domain3223– access denied3305– domain is locked3306– domain is deleted3308– deleting the record failed3309– record with this ID does not exist5001– 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=1mode) and6000(internal WAPI layer initialization error). For PATCH/DELETE methods, if the{domain}segment is missing from the URL, error6001is returned (required parameterdomainmissing). - An unrecognized combination of URL segments (e.g.
/domains/{domain}/rowswithout{row_id}for PATCH/DELETE) always returns4000. It never silently falls through to another operation (e.g. to the whole-domain level). - The REST layer accepts
axfr_ipseither 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_ipandprimary_tsig_*parameters take effect only for domains of typesecondary. template_idwhen creating a domain (POST /domains/add) applies only to a primary domain (type=primaryor not specified). For a secondary domain it returns error2324.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_typemodes:axfronly downloads the records and returns them as text for manual review (nothing is imported), whiletextwrites the records to the domain directly after validation. The typical workflow is therefore to callimport_type=axfrfirst, review the returned text, and only then send it asimport_type=text. author_comment(when adding/modifying a DNS record) allows only letters without diacritics, digits and spaces. Older clients may use theauth_commentparameter with the same meaning instead.- The
nameandtypeof 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
3223is returned.
