WEDOS REST API is still in development. Access and features may change without notice.
This article partially covers the Domains endpoint of WEDOS REST API. Domain contacts and NSSETs have their own articles. For WEDOS API (WAPI) see WAPI – WEDOS Domains.
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/{name}
- GET /domains/info
- GET /domains/check
- GET /domains/{name}/transfer/check
- GET /domains/tld-periods
- POST /domains/create
- POST /domains/{name}/renew
- POST /domains/{name}/transfer
- POST /domains/{name}/auth-info/send
- PATCH /domains/{name}/nsset/update
- PATCH /domains/{name}/keyset/update
- Notes
Domains Endpoint Access
This API covers domain management under the /v2/domains URL prefix. Domain contacts and NSSETs are documented in separate articles.
Base URL and Authentication
The base URL for the domains endpoints is: https://api.wedos.com/v2
All communication runs over HTTPS, and authentication uses only OAuth2: send the header Authorization: Bearer <TOKEN> with every request. The token must have the domains scope (one shared scope for domains, contacts and NSSETs). Without valid authentication the API returns an error.
Data requests (POST/PATCH) are sent as JSON (Content-Type: application/json).
You can add the parameter example=1 to any endpoint (e.g. ?example=1, or &example=1 if the URL already contains other query parameters). Instead of executing the request, the API then returns a sample curl command for that call. Valid authentication is required even in this mode.
Endpoint Overview
| Method | Endpoint | Description |
|---|---|---|
| GET | /domains (equivalently /domains/list) | List of the customer’s domains |
| GET | /domains/{name} | Detail of one domain |
| GET | /domains/info | Detail of one or more domains |
| GET | /domains/check | Check availability of domain(s) for registration |
| GET | /domains/{name}/transfer/check | Check whether a domain can be transferred |
| GET | /domains/tld-periods | Check a valid registration period for a TLD |
| POST | /domains/create | Register a new domain |
| POST | /domains/{name}/renew | Renew a domain registration |
| POST | /domains/{name}/transfer | Transfer a domain from another registrar |
| POST | /domains/{name}/auth-info/send | Send the authorization code to the domain owner’s contact |
| PATCH | /domains/{name}/nsset/update | Change the domain’s DNS servers / NSSET |
| PATCH | /domains/{name}/keyset/update | Set the domain’s DNSSEC (KEYSET) |
Response format
The API response is always a JSON object with the keys code (return code), msg (text description), request_id (request identifier) and, where applicable, data (returned data on success).
Besides the specific (business) return codes listed for each call below, all endpoints may also return these general REST-layer codes:
1000– the request was executed successfully2000– authentication (OAuth2 Bearer token) missing or invalid2004– maximum allowed request size exceeded (URL or request body)4000– unknown/unsupported API method or action4001– input data validation failed4005– no example defined for the current URL form inexample=1mode6000– internal error initializing request processing
GET /domains
Returns a list of all domains of the logged-in customer, optionally filtered by status. The equivalent path GET /domains/list does the same (no change in behaviour, just an alternative URL form).
Parameters:
status– optional, query, string – returns only domains in the given status; if not specified, domains in all statuses are returned
Return codes:
1000– OK2101– invalid format of parameterstatus2242– unknown domain status5001– nobody is logged in
Response data:
domain– array of the customer’s domains; each item contains:name– domain namestatus– domain status
Example:
curl -X GET -H 'Authorization: Bearer <TOKEN>' \
'https://api.wedos.com/v2/domains?status=active'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3d4",
"data": {
"domain": [
{ "name": "domain1.tld", "status": "active" },
{ "name": "domain2.tld", "status": "active" }
]
}
}
GET /domains/{name}
Returns detailed information about one domain by its name in the URL path.
Parameters:
name– required, path – domain name
Return codes:
1000– OK2100– required parameter missing2101– invalid parameter format2201– unsupported TLD2202– invalid domain name format3216– error loading domain information3222– failed to load the domain object3223– the domain is in another customer account4205– registry connection error
Response data:
domain– object with domain information:name– domain namestatus– domain status at the registryreg_owner,reg_creator,reg_update– registrar identifiers (ours/other)setup_date,expiration,updated_date,transfer_date– registration/expiration/update datesowner_c,admin_c,tech_c– identifiers of associated contacts (per registry)dns.server– array of configured DNS servers (name,addr_ipv4,addr_ipv6)dnssec_keys– configured DNSSEC keys (if any)own_*(own_name,own_company,own_email,own_addr_street, …) – snapshot of the owner contact’s details at the time of the query
Example:
curl -X GET -H 'Authorization: Bearer <TOKEN>' \
'https://api.wedos.com/v2/domains/domena1.tld'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3d5",
"data": {
"domain": {
"name": "domena1.tld",
"status": "active",
"reg_owner": "WEDOS",
"setup_date": "2024-01-10",
"expiration": "2027-01-10",
"owner_c": "CONTACT-1",
"dns": {
"server": [
{ "name": "ns.wedos.com", "addr_ipv4": null, "addr_ipv6": null },
{ "name": "ns.wedos.org", "addr_ipv4": null, "addr_ipv6": null }
]
},
"own_name": "Esmeralda Excavadora",
"own_email": "esmeralda@wedos.com"
}
}
}
GET /domains/info
Functionally the same as GET /domains/{name}, but lets you request information about several domains at once (comma-separated names) via a query parameter.
Parameters:
name– required, query, string – domain name, or several names separated by commas (no spaces)
Return codes:
1000– OK (for multi-domain queries the API always returns this code; the result for each domain is in its own node, see below)2100– required parameter missing2101– invalid parameter format2201– unsupported TLD2202– invalid domain name format3216,3222,3223,4205– see GET /domains/{name}
Response data:
- For one domain:
domain– an object with the same structure as GET /domains/{name} - For several domains:
domain– an array of objects, each additionally containingcode(the processing return code for that domain) andresult(its text description). In a batch query the processing status is tracked per domain, not at the level of the whole response.
Example:
curl -X GET -H 'Authorization: Bearer <TOKEN>' \
'https://api.wedos.com/v2/domains/info?name=domain1.tld,domain2.tld'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3d6",
"data": {
"domain": [
{ "name": "domain1.tld", "status": "active", "expiration": "2027-01-10" },
{ "name": "domain2.tld", "code": 3223, "result": "Domain belongs to another account" }
]
}
}
GET /domains/check
Checks whether one or more domains are available for registration (with us, or generally according to availability at the registry).
Parameters:
name– required, query, string – domain name, or several names separated by commas
Return codes:
1000– the domain is available for registration (for multi-domain queries the API always returns this code; the result for each domain is in its own node, see below)2100– parameternamemissing2101– invalid parameter format2201– unsupported TLD2202– invalid domain name format2250– check limit exceeded (locked)2251– limit check failed3201– the domain is already registered3203– the domain is not available3204– the domain is in quarantine3205– the domain is reserved3206– the domain is blocked (the reason – premium/trademark/reservation/short name – is given in the text description)4201– check failed – registry connection error- other status codes specific to the availability check
Response data:
- For one domain:
name– the queried domain name (the check result is directly in the response’scode/msg) - For several domains: an array of objects, each with
name,code(the check result for that domain) andresult(its text description)
Example:
curl -X GET -H 'Authorization: Bearer <TOKEN>' \
'https://api.wedos.com/v2/domains/check?name=domain1.tld,domain2.tld'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3d7",
"data": [
{ "name": "domain1.tld", "code": 3201, "result": "Domain is already registered" },
{ "name": "domain2.tld", "code": 1000, "result": "OK" }
]
}
GET /domains/{name}/transfer/check
Checks whether the domain can be transferred to us from another registrar, without needing to know the authorization code.
Parameters:
name– required, path – domain name
Return codes:
1000– the domain is available for transfer2100– required parameter missing2101– invalid parameter format2201– unsupported TLD2202– invalid domain name format3207– the domain is already registered with us3208– cannot be transferred because expiration is too close3266– cannot be transferred, the domain has expired4206– registry connection error
Response data: None – the result is carried directly by the response’s code/msg.
Example:
curl -X GET -H 'Authorization: Bearer <TOKEN>' \
'https://api.wedos.com/v2/domains/domain1.tld/transfer/check'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3d8"
}
GET /domains/tld-periods
Checks whether a domain under the given TLD can be registered/renewed for the given number of years.
Parameters:
tld– required, query, string – TLD (without the dot, e.g.cz)period– required, query, integer – requested period in years
Return codes:
1000– OK, the period is valid for the TLD2100– input parameter missing2101– invalid input parameters2203– the period is not valid for the TLD
Response data: None – the result is carried directly by the response’s code/msg.
Example:
curl -X GET -H 'Authorization: Bearer <TOKEN>' \
'https://api.wedos.com/v2/domains/tld-periods?tld=eu&period=1'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3d9"
}
POST /domains/create
Registers a new domain. You must provide exactly one of the parameters dns or nsset (to set the domain’s DNS/NSSET), never both.
Parameters:
name– required, string – name of the domain to registerperiod– required, integer – registration length in yearsowner_c– required, string – identifier (handle) of the domain owner contactadmin_c– optional, string – identifier of the administrative contactdns– optional, array – array of DNS servers in the form[{"name":"ns1.example.com","addr_ipv4":"1.2.3.4","addr_ipv6":"..."},...](addr_ipv4/addr_ipv6are optional for each server); mutually exclusive withnssetnsset– optional, string – handle of an existing NSSET to assign to the domain (only for registries that support NSSETs, e.g. .cz); mutually exclusive withdnsrules– optional, array – confirmation of consent to the registration rules (required only for TLDs that require it)
Return codes:
1000– OK, domain registered1001– request accepted, will be completed asynchronously2100– required parameter missing2101– invalid parameter format2201– unsupported TLD2202– invalid domain name format2203– invalid period2204– parameterowner_cmissing2207– invalid format ofowner_c2208– invalid format ofadmin_c2209– NSSET syntax error2210– DNS server syntax error2211– too many DNS servers2245– consent to the registration terms not given3001– invalid currency3002– insufficient credit3211– contactowner_cunavailable3212– contactadmin_cunavailable3221– domain creation failed4002– deducting credit from the account failed- other error codes specific to domain registration
Response data:
num– order numberexpiration– domain expiration datecredit– credit balance after payment
Example:
curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
'https://api.wedos.com/v2/domains/create' \
--data '{
"name": "domain1.tld",
"period": 1,
"owner_c": "CONTACT-1",
"dns": [
{ "name": "ns.wedos.com" },
{ "name": "ns.wedos.org" }
]
}'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3e1",
"data": {
"num": "202610010001",
"expiration": "2027-10-01",
"credit": "1234.50"
}
}
POST /domains/{name}/renew
Renews the domain registration by the given number of years. This cannot be done for .eu domains – they renew automatically.
Parameters:
name– required, path – domain nameperiod– required, integer – number of years to renew
Return codes:
1000– OK1001– request accepted, will be completed asynchronously2100– required parameter missing2101– invalid parameter format2201– unsupported TLD2203– invalid period2269– an unpaid (new) period already exists3001– invalid currency3002– insufficient credit3222– failed to open the domain3223– the domain does not belong to this customer account3224– domain renewal failed3265– the domain cannot be renewed now – the number of days to expiration exceeds the allowed limit4208– renewal failed – connection error
Response data:
num– order numberexpiration– new domain expiration datecredit– credit balance after payment
Example:
curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
'https://api.wedos.com/v2/domains/domain1.tld/renew' \
--data '{"period": 1}'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3e2",
"data": {
"num": "202610010002",
"expiration": "2028-10-01",
"credit": "1134.50"
}
}
POST /domains/{name}/transfer
Transfers a domain to us from another registrar. The dns parameter works as follows: if it is not included in the request at all, the domain’s current DNS server settings are taken over automatically; false or an empty array sets the default WEDOS servers; an array of objects sets specific servers.
Parameters:
name– required, path – domain nameauth_info– required, string – the domain’s authorization code (transfer code)owner_c– optional, string – identifier of the owner contact (required only for TLDs where the registry requires it)dns– optional, array – array of DNS servers in the same form as in POST /domains/createrules– optional, array – confirmation of consent to the rules (only for TLDs that require it)
Return codes:
1000– transfer completed successfully1001– request accepted, will be executed asynchronously2100– required parameter missing2101– invalid parameter format2201– unsupported TLD2202– invalid domain name format2204– owner contact identifier missing2207– invalid owner contact identifier2210– invalid DNS server format2215–auth_infomissing, which is required for this TLD3001– invalid currency3207– the domain is already registered with us3208– cannot be transferred because expiration is too close3219– a pending transfer request exists for this domain3220– the domain is already in our records3226– domain transfer failed3227– authorization error at the domain registry3266– cannot be transferred, the domain has expired- other error codes specific to domain transfer
Response data:
num– order numberexpiration– domain expiration datecredit– credit balance after payment
Example:
curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
'https://api.wedos.com/v2/domains/domain1.tld/transfer' \
--data '{"auth_info": "AUTHCODE123", "owner_c": "CONTACT-1"}'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3e3",
"data": {
"num": "202610010003",
"expiration": "2027-10-01",
"credit": "1134.50"
}
}
POST /domains/{name}/auth-info/send
Sends the domain’s authorization code (transfer code) to the e-mail of the domain owner contact.
Parameters:
name– required, path – domain name
Return codes:
1000– OK, authorization code sent to the domain owner’s e-mail2100– required parameter missing2101– invalid parameter format2201– unsupported TLD2202– invalid domain name format2243– sending the authorization code is not allowed for this domain3209– sending the authorization code failed3210– sending failed – the domain is unavailable3222– failed to load the domain3223– the domain does not belong to this customer account4214– sending failed – connection error
Response data: None – the result is carried directly by the response’s code/msg.
Example:
curl -X POST -H 'Authorization: Bearer <TOKEN>' \
'https://api.wedos.com/v2/domains/domain1.cz/auth-info/send'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3e4"
}
PATCH /domains/{name}/nsset/update
Sets new DNS servers for the domain, or links it to an existing NSSET. You must provide exactly one of the parameters dns or nsset, never both.
Parameters:
name– required, path – domain namedns– optional, array – array of DNS servers in the same form as in POST /domains/create; mutually exclusive withnssetnsset– optional, string – handle of an existing NSSET; mutually exclusive withdns
Return codes:
1000– OK1001– OK, executed asynchronously2100– required parameter missing (neitherdnsnornssetgiven)2101– invalid parameters (bothdnsandnssetgiven, or invalid format)2201– unsupported TLD2202– invalid domain name2209– NSSET syntax error2210– DNS server syntax error2211– too many DNS servers3214– NSSET unavailable3222– failed to open the domain3223– the domain belongs to another customer account3225– DNS/NSSET update failed3315– identical NS servers are already set for the domain4204– connection error (NSSET)4210– connection error (DNS)
Response data: None – the result is carried directly by the response’s code/msg.
Example:
curl -X PATCH -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
'https://api.wedos.com/v2/domains/domain1.tld/nsset/update' \
--data '{
"dns": [
{ "name": "ns.wedos.com" },
{ "name": "ns.wedos.org" }
]
}'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3e5"
}
PATCH /domains/{name}/keyset/update
Sets, disables or switches DNSSEC for the domain.
Parameters:
name– required, path – domain namekeyset– required – DNSSEC setting:0– DNSSEC disabled1– WEDOS-managed DNSSEC- any other string – handle of the customer’s own KEYSET
Return codes:
1000– OK2100– required parameter missing2101– invalid parameter format2201– unsupported TLD2202– invalid domain name format- other error codes specific to DNSSEC settings
Response data: None – the result is carried directly by the response’s code/msg.
Example:
curl -X PATCH -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
'https://api.wedos.com/v2/domains/domain1.tld/keyset/update' \
--data '{"keyset": 1}'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3e6"
}
Notes
- The endpoints under
/v2/domains,/v2/contactsand/v2/nssetsare handled by one shared server class and all share one OAuth2 scope,domains. From the client’s point of view, they are three logically separate but administratively unified APIs. - The
dnsparameter (for domains and NSSETs) is given as a plain array of objects{"name": "...", "addr_ipv4": "...", "addr_ipv6": "..."}. Internally, it is converted to the legacy format used by older API versions before the WAPI call. Theaddr_ipv4andaddr_ipv6items are optional for each server. - For POST /domains/create, PATCH /domains/{name}/nsset/update and POST /domains/{name}/transfer, exactly one of the
dns/nssetparameters must be given. For transfer, additionally: ifdnsis not included in the request at all, the API automatically detects and keeps the domain’s current DNS server settings. - For multi-domain queries (GET /domains/info, GET /domains/check with several comma-separated names), the return code of the whole response is always
1000. Read the processing result for each domain from thecode/resultof its element indata. - In GET /domains/{name} you can, in theory, also put several comma-separated names directly into the path segment (the API passes this value to the same WAPI command as GET /domains/info). In practice, use GET /domains/info for multi-domain queries, because a single domain in the path is more readable.
- This documentation intentionally does not cover the endpoints under
/v2/domains/{name}/miniweb/...(the Miniweb add-on service). They are handled by a separate class and will be documented separately.
