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. Domains and NSSETs have their own articles. For WEDOS API (WAPI) see WAPI – WEDOS Domain Contacts.
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:
- Notes
Contacts Endpoint Access
This API covers the management of domain contacts under the /v2/contacts URL prefix. You must always specify the TLD for contacts, because the format and validation of contact details differ by the registry the TLD belongs to.
Base URL and Authentication
The base URL for the contacts 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 | /contacts/check | Check availability/existence of a contact |
| GET | /contacts/{cname} | Contact information |
| POST | /contacts/create | Create a new contact |
| POST | /contacts/{cname}/transfer | Transfer a contact |
| POST | /contacts/{cname}/auth-info/send | Send the contact’s authorization code |
| PATCH | /contacts/{cname} | Modify a contact |
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 /contacts/check
Checks whether a contact handle is free to use and what its status is at the registry.
Parameters:
tld– required, query, string – TLD for which the contact is checkedcname– required, query, string – contact handle (identifier)reg_key– optional, query, string – identifier of a specific registry (if the TLD supports several registries/modes)
Return codes:
1000– the contact is free and usable2201– invalid TLD2216– invalid contact identifier format2218– contacts are generated automatically at this registry (you cannot choose the handle)3228– the registry does not support contacts3231– the contact already exists3233– the contact cannot be used3234– the contact cannot be used – quarantine3235– the contact cannot be used – reserved3236– the contact cannot be used – blocked3237– the contact is already registered with us4211– contact check failed – 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/contacts/check?tld=eu&cname=CONTACT'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3f1"
}
GET /contacts/{cname}
Returns detailed information about a contact.
Parameters:
cname– required, path – contact handletld– required, query, string – TLD under which the contact is looked upauth_info– optional, query, string – the contact’s authorization code (if given, it must match the code set on the object, otherwise an error is returned)reg_key– optional, query, string – identifier of a specific registry
Return codes:
1000– OK2201– incorrectly specified TLD2216– contact identifier syntax error3215– invalid authorization code (given and does not match)3228– the registry does not support contacts3229– error loading the contact3236– the contact is blocked4212– connection error5001– nobody is logged in
Response data:
contact– object with contact details:contact_id,roid,status– identifier, ROID and status of the contact at the registryname,fname,lname,company– name/first name/last name, or company nameaddr_street,addr_city,addr_zip,addr_state,addr_country– addressphone,fax,email,email2– contact detailsic,dic,taxpayer– company ID (IČ), tax ID (DIČ), VAT payer statusreg_owner,reg_creator,reg_update– registrar identifierscreated_date,updated_date,transfer_date– creation/update/transfer datesdisclose– data disclosure settings (per registry)other– additional registry-specific data
Example:
curl -X GET -H 'Authorization: Bearer <TOKEN>' \
'https://api.wedos.com/v2/contacts/CONTACT?tld=eu'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3f2",
"data": {
"contact": {
"contact_id": "CONTACT",
"status": "ok",
"fname": "Esmeralda",
"lname": "Excavadora",
"company": null,
"addr_street": "Street 123",
"addr_city": "City",
"addr_zip": "11000",
"addr_country": "CZ",
"phone": "+420.777123456",
"email": "esmeralda@wedos.com",
"created_date": "2024-01-10",
"updated_date": null
}
}
}
POST /contacts/create
Creates a new domain contact for the given TLD.
Parameters:
tld– required, string – TLD for which the contact is createdreg_key– optional, string – identifier of a specific registrycontact– required, object – contact details; the available fields differ by registry, typically:cname(optional) – requested contact handle; omit it for registries that generate handles automaticallyfname,lname– first and last name (for a natural person)company– company name (for a legal entity)addr_street,addr_city,addr_zip,addr_state,addr_country– addressphone,fax,email,email2– contact detailsic,dic,taxpayer– company ID (IČ), tax ID (DIČ), VAT payer status- other items depending on the specific registry
Return codes:
1000– contact created2100– required parameter missing2101– invalid input parameters2201– invalid TLD2216– invalid contact name2218– contact names are created automatically at this registry (you cannot specify your own)2219–2242– missing or invalid format of individual contact items (company, first name, last name, e-mail, phone, fax, company ID, tax ID, address, region, other data)3228– the registry does not support contacts3230– contact creation failed3231– the contact name is already used3233– the contact cannot be used3234– the contact cannot be used – quarantine3236– the contact cannot be used – blocked3237– the contact is already registered with us4211– check failed – communication error4213– contact creation failed – communication error
Response data:
cname– handle of the created contact
Example:
curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
'https://api.wedos.com/v2/contacts/create' \
--data '{
"tld": "eu",
"contact": {
"fname": "Esmeralda",
"lname": "Excavadora",
"addr_street": "Street 123",
"addr_city": "City",
"addr_zip": "11000",
"addr_country": "CZ",
"email": "esmeralda@wedos.com",
"phone": "+420.777123456"
}
}'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3f3",
"data": {
"cname": "CONTACT"
}
}
POST /contacts/{cname}/transfer
Transfers a contact to us from another registrar (only at registries that support contact transfer, e.g. CZ.NIC).
Parameters:
cname– required, path – contact handletld– required, string – TLDauth_info– required, string – the contact’s authorization codereg_key– optional, string – identifier of a specific registry
Return codes:
1000– OK2100– required parameter missing2101– invalid input parameters2201– invalid TLD2215– parameterauth_infomissing2216– invalid contact identifier2244– this domain/registry does not support contact transfer3229– the contact is not available3237– the contact is already registered with us3240– authorization error3241– transfer failed4216– transfer 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>' -H 'Content-Type: application/json' \
'https://api.wedos.com/v2/contacts/CONTACT/transfer' \
--data '{"tld": "cz", "auth_info": "AUTHCODE123"}'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3f4"
}
POST /contacts/{cname}/auth-info/send
Sends the contact’s authorization code to its contact e-mail.
Parameters:
cname– required, path – contact handletld– required, string – TLDreg_key– optional, string – identifier of a specific registry
Return codes:
1000– OK2100– required parameter missing2101– invalid input parameters2201– invalid TLD2216– invalid contact name2243– sending the authorization code is not allowed for this contact3213– the contact is unavailable3215– sending the code failed3228– the registry does not support contacts4217– sending failed – communication error5001– authentication error
Response data: None – the result is carried directly by the response’s code/msg.
Example:
curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' \
'https://api.wedos.com/v2/contacts/CONTACT/auth-info/send' \
--data '{"tld": "eu"}'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3f5"
}
PATCH /contacts/{cname}
Modifies the details of an existing contact. Cannot be used at registries where contacts are not editable (e.g. Ascio).
Parameters:
cname– required, path – contact handletld– required, string – TLDauth_info– optional, string – the contact’s authorization codecontact– required, object – contact details to modify (same fields as in POST /contacts/create; only the given fields are changed)reg_key– optional, string – identifier of a specific registry
Return codes:
1000– OK2100– required parameter missing2101– invalid input parameters2201– invalid TLD2207– syntax error2216– invalid contact name2219–2241– missing or invalid format of individual modified items (same range as for contact creation)3211– failed to load the contact3238– authorization error3239– modification failed4202– contact unavailable – connection error4215– execution failed – connection error
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/contacts/CONTACT' \
--data '{"tld": "eu", "contact": {"email": "esmeralda-new@wedos.com"}}'
{
"code": 1000,
"msg": "OK",
"request_id": "a1b2c3f6"
}
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. - For contacts,
tldis always a required parameter, because the same handle (cname) may in theory exist at several registries, and the validation/format of the data differs by TLD/registry.
