Register Domain:
This command is used to send a registration command to the registrar.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
| regperiod | Number | Yes | Registration period |
| domainfields | String | No | A base64 encoded serialized array of the TLD specific field values |
| addons | addons | No | |
| nameservers |
nameservers:{ } |
Yes | |
| contacts |
contacts:{ } |
Yes |
the contact Type is defined by:contact:{ } New identifier field requirement for .ma domain contacts// use tax_id for the new identifier
|
| idnLanguage | String | No |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/order/domains/register" \
-d "domain=exempledomain.ma®period=1&addons[dnsmanagement]=1&addons[emailforwarding]=0&addons[idprotection]=0&nameservers[ns1]=dns1.genious.net&nameservers[ns2]=dns2.genious.net&domainfields=&contacts[registrant][firstname]=John&contacts[registrant][lastname]=Doe&contacts[registrant][fullname]=John Doe&contacts[registrant][companyname]=&contacts[registrant][email]=john@doe.com&contacts[registrant][address1]=123 Fake Street&contacts[registrant][address2]=&contacts[registrant][city]=Fake Town&contacts[registrant][state]=Fake State&contacts[registrant][postcode]=00000&contacts[registrant][country]=MA&contacts[registrant][phonenumber]=0660000000&contacts[registrant][tax_id]=EE000001"
Example answer:
{"result":"success","msg":"Domain has been registered"}
TransferDomain:
This command is used to send a transfer command to the registrar.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
| regperiod | Number | Yes | Registration period |
| eppcode | String | ||
| domainfields | String | No | A base64 encoded serialized array of the TLD specific field values |
| addons |
addons:{ } |
No | |
| nameservers |
nameservers:{ } |
Yes | |
| contacts |
contacts:{ } |
Yes | |
| idnLanguage | String | No |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/order/domains/transfer" \
-d "domain=exempledomain.ma®period=1&eppcode=theeppcodeofdomain&addons[dnsmanagement]=1&addons[emailforwarding]=0&addons[idprotection]=0&nameservers[ns1]=dns1.genious.net&nameservers[ns2]=dns2.genious.net&domainfields=&contacts[registrant][firstname]=John&contacts[registrant][lastname]=Doe&contacts[registrant][fullname]=John Doe&contacts[registrant][companyname]=&contacts[registrant][email]=john@doe.com&contacts[registrant][address1]=123 Fake Street&contacts[registrant][address2]=&contacts[registrant][city]=Fake Town&contacts[registrant][state]=Fake State&contacts[registrant][postcode]=00000&contacts[registrant][country]=MA&contacts[registrant][phonenumber]=0660000000&contacts[registrant][tax_id]=EE000001"
Example answer:
{"result":"success","msg":"Domain transfer initiated successfully."}
RenewDomain
This command is used to send a renewal order to the registrar.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
| addons | addons | No | Suffix attached to domain name |
| regperiod | Number | Yes | Registration period |
| idnLanguage | String | No |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/order/domains/renew" \
-d "domain=exempledomain.com®period=1&addons[dnsmanagement]=1&addons[emailforwarding]=0&addons[idprotection]=0"
Example answer:
{"result":"success","msg":"The domain has been successfully."}
GetNameservers:
This command is used to get the nameservers of a domain.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
request example:
curl -X GET \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/nameservers"
Example answer:
{"result":"success","ns1":"ns1.exampledomain.com","ns2":"ns2.exampledomain.com"}
SaveNameservers
This command is used to update the nameservers of a domain.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
| ns1 | String | No | First nameserver |
| ns2 | String | No | Second nameserver |
| ns3 | String | No | Third nameserver |
| ns4 | String | No | Fourth nameserver |
| ns5 | String | No | Fifth nameserver |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/nameservers" \
-d "domain=exempledomain.com&ns1=ns1.exampledomain.com&ns2=ns2.exampledomain.com"
Example answer:
{"result":"success"}
ReleaseDomain:
This command is used to send a Release command to the registrar.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
| transfertag | String | Yes | The new tag for the domain |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/release" \
-d "domain=exempledomain.com&transfertag=1AND1-TEST"
Example answer:
{"result":"success"}
GetEPPCode:
This command allows you to obtain the EPP code of a domain.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
request example:
curl -X GET \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/eppcode"
Example answer:
{"result":"success","eppcode":"23svxce123fds"}
GetContactDetails:
This command is used to perform a whois lookup on a specified domain.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
request example:
curl -X GET \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/contact"
Example answer:
{"result":"success","Registrant":{"Name":"John Doe","Company":"Company name","Address":"P.O.","City":"Amsterdam","Country":"NL","Zip_Code":"1001 GT","Email":"john@exampledomain.com","Telephone":"N\/A"}}
SaveContactDetails:
This command is used to update contact information on a domain.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
| contactdetails |
contacts:{ } |
Yes |
thi is example of contact Type here :"contactdetails" => [ "Tech" => [ 'Contact Name' => 'John Doe', 'Company Name' => '','Address 1' => '123 Fake Street','Address 2' => '', 'City' => 'Fake Town', 'State' => 'Fake State', 'ZIP code' => '00000','Country' => 'MA', 'Phone' => '0660000000', 'Email' => 'john@doe.com', // use ID for the new identifier 'ID' => 'EE00002', ], ] |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/contact" \
-d "domain=exampledomain.ma&contactdetails[Tech][Contact Name]=John Doe&contactdetails[Tech][Company Name]=&contactdetails[Tech][Address 1]=123 Fake Street&contactdetails[Tech][Address 2]=&contactdetails[Tech][City]=Fake Town&contactdetails[Tech][State]=Fake State&contactdetails[Tech][ZIP code]=00000&contactdetails[Tech][Country]=MA&contactdetails[Tech][Phone]=0660000000&contactdetails[Tech][Email]=john@doe.com&contactdetails[Tech][ID]=EE00002"
Example answer:
{"result":"success","Registrant":{"Name":"John Doe","Company":"Company name","Address":"P.O.","City":"Amsterdam","Country":"NL","Zip_Code":"1001 GT","Email":"john@exampledomain.com","Telephone":"N\/A"}}
DomainGetLockingStatus:
This command is used to get the lock status of a domain.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
request example:
curl -X GET \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/lock"
Example answer:
{"result":"success","lockstatus":"unlocked"}
DomainUpdateLockingStatus:
This command is used to update the lock status of a domain.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
| lockstatus | String | Yes |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/lock" \
-d "domain=exampledomain.ma&lockstatus=locked"
Example answer:
{"result":"success"}
GetDNS:
This function is called when DNS host records need to be displayed in WHMCS query parameters.
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
request example:
curl -X GET \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/dns"
Example answer:
{"0":{"hostname":"*","type":"A","address":"0.0.0.0","priority":null},"1":{"hostname":"mail","type":"MXE","address":"0.0.0.0","priority":"10"},"result":"success"}
SaveDNS:
This function is called when changes to DNS host record information are submitted
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
| dnsrecords |
dnsrecords:{ } |
Yes |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(echo -n "1234567890QWERTYUIOPASDFGHJKLZXCVBNM" | openssl dgst -sha256 -hmac "email@example.com:$(date -u +"%y-%m-%d %H")" | cut -d' ' -f2)" | base64 | tr -d '\n')" \
--url "<endpoint>/domains/{domain}/dns" \
-d "domain=exampledomain.ma&dnsrecords[dnsrecords[hostname]=@&dnsrecords[dnsrecords[type]=A&dnsrecords[dnsrecords[address]=x.x.x.x&dnsrecords[dnsrecords][priority]=10"
Example answer:
{"result":"success"}
DeleteDNS:
This function is called when you want to remove DNS
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/delete" \
-d "domain=exampledomain.ma"
RegisterNameserver:
This function is called when a child name server needs to be registered.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String | Yes | Domain name |
| nameserver | String | Yes | |
| ipaddress | String | Yes |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/nameservers/register" \
-d "domain=exampledomain.ma&nameserver=test.exampledomain.com&ipaddress=1.1.1.1"
Example answer:
{"result":"success"}
ModifyNameserver:
This function is called when a child name server needs to be edited
| Name | Type | Required? | Description |
|---|---|---|---|
| nameserver | String | Yes | |
| currentipaddress | String | Yes | |
| newipaddress | String | Yes |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/nameservers/register" \
-d "nameserver=test.exampledomain.com¤tipaddress=1.1.1.1&newipaddress=1.1.1.2"
Example answer:
{"result":"success"}
DeleteNameserver:
This function is called when a child name server needs to be deleted.
Request Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
| nameserver | String | Yes |
request example:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "username: email@example.com" \ -H "token: $(echo -n "$(printf '%s' 'email@example.com:$(date -u +"%y-%m-%d H")')" | openssl dgst -sha256 -hmac '1234567890QWERTYUIOPASDFGHJKLZXCVBNM' -binary | base64)" \
--url "<endpoint>/domains/{domain}/nameservers/delete" \
-d "nameserver=test.exampledomain.com"
Example answer:
{"result":"success"}
GetEmailForwarding:
This function is called when email forwarding needs to be viewed in WHMCS request settings
Request Parameters
<td style="width: 73px
| Name | Type | Required? | Description |
|---|---|---|---|
| domain | String |