Save Contact Details
curl --request POST \
--url https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'token: <token>' \
--header 'username: <username>' \
--data domain=example.com \
--data 'contactdetails={
"Registrant": {
"First_Name": "John",
"Last_Name": "Doe"
}
}'import requests
url = "https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact"
payload = {
"domain": "example.com",
"contactdetails": "{
\"Registrant\": {
\"First_Name\": \"John\",
\"Last_Name\": \"Doe\"
}
}"
}
headers = {
"username": "<username>",
"token": "<token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
username: '<username>',
token: '<token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
domain: 'example.com',
contactdetails: '{\n "Registrant": {\n "First_Name": "John",\n "Last_Name": "Doe"\n }\n}'
})
};
fetch('https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "domain=example.com&contactdetails=%7B%0A%20%20%22Registrant%22%3A%20%7B%0A%20%20%20%20%22First_Name%22%3A%20%22John%22%2C%0A%20%20%20%20%22Last_Name%22%3A%20%22Doe%22%0A%20%20%7D%0A%7D",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded",
"token: <token>",
"username: <username>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact"
payload := strings.NewReader("domain=example.com&contactdetails=%7B%0A%20%20%22Registrant%22%3A%20%7B%0A%20%20%20%20%22First_Name%22%3A%20%22John%22%2C%0A%20%20%20%20%22Last_Name%22%3A%20%22Doe%22%0A%20%20%7D%0A%7D")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("username", "<username>")
req.Header.Add("token", "<token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact")
.header("username", "<username>")
.header("token", "<token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("domain=example.com&contactdetails=%7B%0A%20%20%22Registrant%22%3A%20%7B%0A%20%20%20%20%22First_Name%22%3A%20%22John%22%2C%0A%20%20%20%20%22Last_Name%22%3A%20%22Doe%22%0A%20%20%7D%0A%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["username"] = '<username>'
request["token"] = '<token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "domain=example.com&contactdetails=%7B%0A%20%20%22Registrant%22%3A%20%7B%0A%20%20%20%20%22First_Name%22%3A%20%22John%22%2C%0A%20%20%20%20%22Last_Name%22%3A%20%22Doe%22%0A%20%20%7D%0A%7D"
response = http.request(request)
puts response.read_body{}{
"error": "Invalid API Token provided"
}{
"error": "Invalid API Token provided"
}{
"error": "Invalid API Token provided"
}{
"error": "Invalid API Token provided"
}Contacts
Save Contact Details
Updates the WHOIS contact details for the domain. Underscores in field names are automatically converted to spaces (e.g. First_Name becomes First Name). Contact types not provided are filled with current values.
POST
/
domains
/
{domain}
/
contact
Save Contact Details
curl --request POST \
--url https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'token: <token>' \
--header 'username: <username>' \
--data domain=example.com \
--data 'contactdetails={
"Registrant": {
"First_Name": "John",
"Last_Name": "Doe"
}
}'import requests
url = "https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact"
payload = {
"domain": "example.com",
"contactdetails": "{
\"Registrant\": {
\"First_Name\": \"John\",
\"Last_Name\": \"Doe\"
}
}"
}
headers = {
"username": "<username>",
"token": "<token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
username: '<username>',
token: '<token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
domain: 'example.com',
contactdetails: '{\n "Registrant": {\n "First_Name": "John",\n "Last_Name": "Doe"\n }\n}'
})
};
fetch('https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "domain=example.com&contactdetails=%7B%0A%20%20%22Registrant%22%3A%20%7B%0A%20%20%20%20%22First_Name%22%3A%20%22John%22%2C%0A%20%20%20%20%22Last_Name%22%3A%20%22Doe%22%0A%20%20%7D%0A%7D",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded",
"token: <token>",
"username: <username>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact"
payload := strings.NewReader("domain=example.com&contactdetails=%7B%0A%20%20%22Registrant%22%3A%20%7B%0A%20%20%20%20%22First_Name%22%3A%20%22John%22%2C%0A%20%20%20%20%22Last_Name%22%3A%20%22Doe%22%0A%20%20%7D%0A%7D")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("username", "<username>")
req.Header.Add("token", "<token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact")
.header("username", "<username>")
.header("token", "<token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("domain=example.com&contactdetails=%7B%0A%20%20%22Registrant%22%3A%20%7B%0A%20%20%20%20%22First_Name%22%3A%20%22John%22%2C%0A%20%20%20%20%22Last_Name%22%3A%20%22Doe%22%0A%20%20%7D%0A%7D")
.asString();require 'uri'
require 'net/http'
url = URI("https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["username"] = '<username>'
request["token"] = '<token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "domain=example.com&contactdetails=%7B%0A%20%20%22Registrant%22%3A%20%7B%0A%20%20%20%20%22First_Name%22%3A%20%22John%22%2C%0A%20%20%20%20%22Last_Name%22%3A%20%22Doe%22%0A%20%20%7D%0A%7D"
response = http.request(request)
puts response.read_body{}{
"error": "Invalid API Token provided"
}{
"error": "Invalid API Token provided"
}{
"error": "Invalid API Token provided"
}{
"error": "Invalid API Token provided"
}Headers
Reseller email address registered in WHMCS
Example:
HMAC-SHA256 authentication token.
PHP formula: base64_encode(hash_hmac('sha256', $apiKey, $email . ':' . gmdate('y-m-d H')))
Important: hash_hmac without the 3rd parameter true (returns hex, not binary), then base64_encode of the hex result. The token is 88 characters long.
An optional timestamp header (Unix timestamp, 60-second tolerance) can be sent to synchronize time.
Example:
"YTk4YjRmNjI..."
Path Parameters
Domain name (e.g. example.com)
Example:
"example.com"
Body
application/x-www-form-urlencoded
Response
Success - Registrar result
The response is of type object.
⌘I