Version 1.0.0
Introduction
With Camoo Hosting API a reseller professional account can easily manage his packages and customers from his own website.
The Camoo.Hosting API is based on REST. It uses built-in HTTP authentication and HTTP status codes. All data exchange is done in JSON format.
To test the Camoo.Hosting API, you will need a valid API account. If you don't have one yet, click here to register for a FREE account.
We have also online an example of PHP library to communicate with our API: Example of PHP library
For all POST
requests, it's important to use the content typemultipart/form-data
.
Authentication
https://api.camoo.hosting/v1/auth
Camoo.Hosting
https://api.camoo.hosting/v1/...
Authentication
Each request must be accompanied by a valid access_token
.
access_token
are generated upon successful authentication.
To authenticate you must send an auth
request.
https://api.camoo.hosting/v1/auth
This request accepts parameters email
and password
.
access_token
If the request succeeded, an authentication object is returned, which includes an access_token
.
Otherwise, an error is
returned. access_token
grants you access to make requests.
Setup the Authorization HTTP header
with your access_token
. Authorization:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjM...
access_token
is valid for 30 minutes, after which it expires.
Authentication
POST https://api.camoo.hosting/v1/auth
POST https://api.camoo.hosting/v1/auth
Content-Type : multipart/form-data
{
"email" : "myemail",
"password" : "mypassword"
}
{
"status" : "OK",
"result" : {
"message" : "Authentification successful",
"access_token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjM..."
}
}
Check availability
Checks the availability of the specified domain name(s).
Parameters
Name | Type | Info | Description |
---|---|---|---|
domain | string | required | Domain name that you need to check the availability for. Without extension e.g: google |
tlds | string | required | TLDs for which the domain name availability needs to be checked. For more than one, it should be separated with commas |
Check availability
https://api.camoo.hosting/v1/domains/availability
POST https://api.camoo.hosting/v1/domains/availability
Content-Type : multipart/form-data
{
"domain" : "example",
"tlds" : "cm,net.cm"
}
{
"status" : OK,
"result" : {
"example.cm" : {
"classkey" : anticcm,
"status" : N,
"antic" : 1,
"promo" : {
},
"price" : {
"addtransferdomain" : 7000,
"restoredomain" : 7000,
"addnewdomain" : 7000,
"renewdomain" : 7000
},
"currency" : XAF
},
"example.net.cm" : {
"classkey" : anticnetcm,
"status" : Y,
"antic" : 1,
"promo" : {
},
"price" : {
"addtransferdomain" : 7000,
"restoredomain" : 7000,
"addnewdomain" : 7000,
"renewdomain" : 7000
},
"currency" : XAF
}
}
}
Register
Registers a domain name.
Parameters
Name | Type | Info | Description |
---|---|---|---|
domain-name | string | required | Domain name that you need to Register. e.g: example.cm |
years | integer | required | Number of years for which you wish to Register this domain name. |
ns | string | required | The Name Servers of the domain name. |
reg-contact-id | integer | required | The Registrant Contact of the domain name. |
admin-contact-id | integer | required | The Administrative Contact of the domain name. |
tech-contact-id | integer | required | The Technical Contact of the domain name. |
billing-contact-id | integer | required | The Billing Contact of the domain name. |
Register
https://api.camoo.hosting/v1/domains/register
POST https://api.camoo.hosting/v1/domains/register
Content-Type : multipart/form-data
{
"domain-name" : "example.cm",
"years" : "1",
"ns" : "ns1.yourCompany.com,ns2.yourCompany.com",
"reg-contact-id" : "1112",
"admin-contact-id" : "1223",
"billing-contact-id" : "1223",
"tech-contact-id" : "1223"
}
{
"status" : OK,
"result" : {
"id" : 38948498404,
"domain" : example.cm,
"message" : Domain registration completed Successfully
}
}
Renew
Renews the specified Domain Registration Order for specified number of years.
Parameters
Name | Type | Info | Description |
---|---|---|---|
id | integer | required | Domain Id of the Domain Registration Order that you want to Renew. |
years | integer | required | Number of years for which you want to Renew this Order. |
endtime | integer | required | Current Expiry Date of the Order in epoch time format. |
Renew
https://api.camoo.hosting/v1/domains/renew
POST https://api.camoo.hosting/v1/domains/renew
Content-Type : multipart/form-data
{
"id" : "38948498404",
"years" : "1",
"endtime" : "1562912181"
}
{
"status" : OK,
"result" : {
"domain" : example.cm,
"message" : Domain renew completed Successfully
}
}
Suspend
Applies the Suspension on the specified Domain. Type of request POST
Parameters
Name | Type | Info | Description |
---|---|---|---|
id | integer | required | domain ID for suspension |
Suspend
https://api.camoo.hosting/v1/domains/suspend
POST https://api.camoo.hosting/v1/domains/suspend
Content-Type : multipart/form-data
{
"id" : "1234"
}
{
"status" : OK,
"result" : {
"domain" : example.cm,
"message" : Domain suspension completed Successfully
}
}
Unsuspend
Removes the Suspension on the specified Domain. Type of request POST
Parameters
Name | Type | Info | Description |
---|---|---|---|
id | integer | required | domain ID |
Unsuspend
https://api.camoo.hosting/v1/domains/unsuspend
POST https://api.camoo.hosting/v1/domains/unsuspend
Content-Type : multipart/form-data
{
"id" : "1234"
}
{
"status" : OK,
"result" : {
"domain" : example.cm,
"message" : Domain unsuspended Successfully
}
}
Resend Verification E-mail
Resends the verification email to the Registrant Contact Email Address for the specified Domain Registration ID. Type of request POST
Parameters
Name | Type | Info | Description |
---|---|---|---|
id | integer | required | domain ID |
Resend Verification E-mail
https://api.camoo.hosting/v1/domains/resend-verification-mail
POST https://api.camoo.hosting/v1/domains/resend-verification-mail
Content-Type : multipart/form-data
{
"id" : "1234"
}
{
"status" : OK,
"result" : {
"domain" : example.cm,
"message" : Verification Email resent
}
}
Is Transferable
Validating a Transfer Request
Parameters
Name | Type | Info | Description |
---|---|---|---|
domain-name | string | required | domain name you want to check. |
Is Transferable
https://api.camoo.hosting/v1/domains/validate-transfer
POST https://api.camoo.hosting/v1/domains/validate-transfer
Content-Type : multipart/form-data
{
"domain-name" : "example.cm"
}
{
"status" : OK,
"result" : 1
}
Transfer
Transfers a domain name.
- You need to ensure that the domain name is not Locked.
Parameters
Name | Type | Info | Description |
---|---|---|---|
domain-name | string | required | Domain name that you need to transfer. e.g: example.cm |
auth-code | string | required | Authorization Code (EEP-code,Domain Secret, Auth Code) of the domain name that you want to transfer. |
years | integer | required | Number of years for which you wish to transfer this domain name. |
ns | string | required | The Name Servers of the domain name. |
reg-contact-id | integer | required | The Registrant Contact of the domain name. |
admin-contact-id | integer | required | The Administrative Contact of the domain name. |
tech-contact-id | integer | required | The Technical Contact of the domain name. |
billing-contact-id | integer | required | The Billing Contact of the domain name. |
Transfer
https://api.camoo.hosting/v1/domains/transfer
POST https://api.camoo.hosting/v1/domains/transfer
Content-Type : multipart/form-data
{
"domain-name" : "example.cm",
"auth-code" : "AKdo?dh-Ogh4",
"years" : "1",
"ns" : "ns1.yourCompany.com,ns2.yourCompany.com",
"reg-contact-id" : "1112",
"admin-contact-id" : "1223",
"billing-contact-id" : "1223",
"tech-contact-id" : "1223"
}
{
"status" : OK,
"result" : {
"id" : 38948498406,
"domain" : example.cm,
"message" : Domain transfer queued Successfully
}
}
Whois CM
Makes a whois for .CM domains. Find out registrant information
Parameters
Name | Type | Info | Description |
---|---|---|---|
domain-name | string | required | domain name you want to check. |
Whois CM
https://api.camoo.hosting/v1/domains/cm-whois
POST https://api.camoo.hosting/v1/domains/cm-whois
Content-Type : multipart/form-data
{
"domain-name" : "example.cm"
}
{
"status" : OK,
"result" : TERMS OF USE ...
}
Get Domain details
Gets domain details By Id.
Parameters
Name | Type | Info | Description |
---|---|---|---|
id | integer | required | Domain's ID |
Get Domain details
https://api.camoo.hosting/v1/domains/details?id={id}
GET https://api.camoo.hosting/v1/domains/details?id={id}
Content-Type : multipart/form-data
{
}
{
"status" : OK,
"result" : {
"id" : 123,
"domain-name" : yourDomain.cm,
"years" : 1,
"created_at" : 2016-05-03T17:46:23+01:00
}
}
Modifying Name Servers
Modifies the nameservers associated with a specific domain registration order.
Parameters
Name | Type | Info | Description |
---|---|---|---|
id | integer | required | Identifier of the Domain Registration Order for which nameservers are to be modified. |
ns | string | required | Comma-separated list of new nameservers for the domain. Requires at least two nameservers. Note
|
Modifying Name Servers
https://api.camoo.hosting/v1/domains/modify-nameservers
POST https://api.camoo.hosting/v1/domains/modify-nameservers
Content-Type : multipart/form-data
{
"id" : "123",
"ns" : "ns1.yourCompany.com,ns2.yourCompany.com"
}
{
"status" : OK,
"result" : {
"message" : Nameservers for Domain ID123 have been successfully modified.
}
}
Adding Contact
Adds a Contact to the domain using the details provided.
Parameters
Name | Type | Info | Description |
---|---|---|---|
name | string | required | Name of the Contact Note
|
company | string | required | Name of the Company Note
|
string | required | Email address of the Contact | |
address-1 | string | required | First line of address of the Contact |
city | string | required | Name of the city |
ccode | string | required | Country code as per ISO 3166-1 alpha-2 |
zipcode | string | required | Zip Code |
phone-cc | integer | required | Telephone number country code Note
|
phone | integer | required | Telephone number Note
|
state | string | required | Name of the State |
address-2 | string | optional | second line of address of the Contact |
address-3 | string | optional | Third line of address of the Contact |
fax-cc | integer | optional | Fax number country code Note
|
fax | integer | optional | Fax number Note
|
customer-id | integer | optional | The Customer under whom you want to create the Contact |
Adding Contact
https://api.camoo.hosting/v1/contacts/add
POST https://api.camoo.hosting/v1/contacts/add
Content-Type : multipart/form-data
{
"name" : "John Doe",
"company" : "Doe Ltd.",
"email" : "[email protected]",
"address-1" : "Bastos",
"city" : "Yaounde",
"ccode" : "CM",
"zipcode" : "0000",
"phone-cc" : "237",
"phone" : "612345689",
"state" : "Centre"
}
{
"status" : OK,
"result" : {
"id" : 2334
}
}
Adding Customer
Creates a Customer Account using the details provided.
Parameters
Name | Type | Info | Description |
---|---|---|---|
name | string | required | Name of the Customer Note
|
company | string | required | Name of the Company Note
|
string | required | Email address of the Customer | |
address-1 | string | required | First line of address of the Customer |
city | string | required | Name of the city |
ccode | string | required | Country code as per ISO 3166-1 alpha-2 |
zipcode | string | required | Zip Code |
phone-cc | integer | required | Telephone number country code Note
|
phone | integer | required | Telephone number Note
|
lang-pref | string | optional | Language Code as per ISO Note
|
state | string | required | Name of the State |
address-2 | string | optional | second line of address of the Customer |
address-3 | string | optional | Third line of address of the Customer |
fax-cc | integer | optional | Fax number country code Note
|
fax | integer | optional | Fax number Note
|
terms | boolean | optional | Accept Terms and Conditions and Privacy Policy to create an account |
password | string | optional | Sets login Password for the customer Note
|
password_confirm | string | optional | Required if Password is set. It should be the same value as Password |
Adding Customer
https://api.camoo.hosting/v1/customers/add
POST https://api.camoo.hosting/v1/customers/add
Content-Type : multipart/form-data
{
"name" : "John Doe",
"company" : "Doe Ltd.",
"email" : "[email protected]",
"address-1" : "Bastos",
"city" : "Yaounde",
"ccode" : "CM",
"terms" : "1",
"lang-pref" : "fr_FR",
"zipcode" : "0000",
"phone-cc" : "237",
"phone" : "612345689",
"state" : "Centre",
"password" : "TopSecre!Passwd",
"password_confirm" : "TopSecre!Passwd"
}
{
"status" : OK,
"result" : {
"id" : 123
}
}
Get Customer By Id
Gets Reseller Customer By Id.
Parameters
Name | Type | Info | Description |
---|---|---|---|
id | integer | required | Customer's ID |
Get Customer By Id
https://api.camoo.hosting/v1/customers/get-by-id/?id={id}
GET https://api.camoo.hosting/v1/customers/get-by-id/?id={id}
Content-Type : multipart/form-data
{
}
{
"status" : OK,
"result" : {
"id" : 123,
"username" : [email protected],
"identities" : {
"0" : {
"id" : 1960,
"email" : [email protected],
"name" : John Doe,
"company" : Doe Ltd.,
"..." : ...
}
}
}
}
Get Customer By E-mail
Gets Reseller Customer By Email.
Parameters
Name | Type | Info | Description |
---|---|---|---|
string | required | Customer's Email |
Get Customer By E-mail
https://api.camoo.hosting/v1/customers/get-by-email/?email={email}
GET https://api.camoo.hosting/v1/customers/get-by-email/?email={email}
Content-Type : multipart/form-data
{
}
{
"status" : OK,
"result" : {
"id" : 123,
"username" : [email protected],
"identities" : {
"0" : {
"id" : 1960,
"email" : [email protected],
"name" : John Doe,
"company" : Doe Ltd.,
"..." : ...
}
}
}
}
Get SSO Token By Id
Gets Reseller Customer SSO Token By Id.
Parameters
Name | Type | Info | Description |
---|---|---|---|
id | integer | required | Customer's ID |
Get SSO Token By Id
https://api.camoo.hosting/v1/customers/sso/?id={id}
GET https://api.camoo.hosting/v1/customers/sso/?id={id}
Content-Type : multipart/form-data
{
}
{
"status" : OK,
"result" : {
"sso_token" : eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9
}
}
Adding Sub-domain
Adds a Sub domain to the domain using the details provided.
Parameters
Name | Type | Info | Description |
---|---|---|---|
name | string | required | Name for the sub domain Note
|
domain-name | string | required | Domain name under which the sud domain will be created |
target | string | required | The target folder on the web space. If given target does not exist, the folder is created. Note
|
Adding Sub-domain
https://api.camoo.hosting/v1/sub-domains/add
POST https://api.camoo.hosting/v1/sub-domains/add
Content-Type : multipart/form-data
{
"name" : "dev",
"domain-name" : "example.cm",
"target" : "dev-folder"
}
{
"status" : OK,
"result" : {
"id" : 1234,
"message" : Sub domain has been created
}
}
Delete Sub-domain
Delete a Subdomain to the domain using the provided subdomain ID. Type of request POST
Parameters
Name | Type | Info | Description |
---|---|---|---|
id | integer | required | Sub domain ID |
Delete Sub-domain
https://api.camoo.hosting/v1/sub-domains/delete
POST https://api.camoo.hosting/v1/sub-domains/delete
Content-Type : multipart/form-data
{
"id" : "1234"
}
{
"status" : OK,
"result" : {
"message" : Sub domain has been deleted
}
}
Activate
Activating the DNS Service
Parameters
Name | Type | Info | Description |
---|---|---|---|
id | integer | required | Domain ID that you need to activate our DNS service. |
Activate
https://api.camoo.hosting/v1/dns/active
POST https://api.camoo.hosting/v1/dns/active
Content-Type : multipart/form-data
{
"id" : "1234"
}
{
"status" : OK,
"result" : {
"zone_id" : 123,
"message" : DNS Record completed Successfully
}
}
Add Record
Add DNS Service record
Parameters
Name | Type | Info | Description |
---|---|---|---|
zone_id | integer | required | Zone ID for which you want to add the record |
value | string | required | A Fully Qualified Domain Name (FQDN) as the destination |
type | string | required | Type of record you want to add Note
|
host | string | optional | The host part of the domain name for which you need to add a record Note
|
ttl | optional | Number of seconds the record needs to be cached by the DNS Resolvers. Default value is 14400. | |
priority | optional | The Priority of the host/record. Value ranges from 0 to 65535. Note
|
|
port | optional | The port number of the service Note
|
|
weight | optional | A relative weight for records with the same priority Note
|
Add Record
https://api.camoo.hosting/v1/dns/add-record
POST https://api.camoo.hosting/v1/dns/add-record
Content-Type : multipart/form-data
{
"zone_id" : "1234",
"host" : "www",
"type" : "cname",
"value" : "example.cm"
}
{
"status" : OK,
"result" : {
"record_id" : 123,
"message" : DNS Record completed Successfully
}
}
Delete Record
Deletes DNS Record
Parameters
Name | Type | Info | Description |
---|---|---|---|
zone_id | integer | required | Zone ID under which the record exists |
record_id | integer | required | Record ID that you want to delete. |
Delete Record
https://api.camoo.hosting/v1/dns/delete-record
POST https://api.camoo.hosting/v1/dns/delete-record
Content-Type : multipart/form-data
{
"zone_id" : "123",
"record_id" : "144"
}
{
"status" : OK,
"result" : {
"zone_id" : 123,
"message" : DNS Record Successfully deleted
}
}
Get All tariffs
Gets all tariffs for an Account.
Parameters
Name | Type | Info | Description |
---|---|---|---|
count | integer | optional | This parameter lets you specify the amount of tariffs to return in your API call. The default for this parameter (if it isn't specified) is 20 tariffs. The maximum amount of tariffs you can have returned to you via this parameter is 100. |
page | integer | optional | Used to page through the tariffs. Every call to this endpoint will return a has_more key with a bool value. If this value is true, then send {page} +1 to get the next page of tariffs. |
Get All tariffs
https://api.camoo.hosting/v1/tariffs/get/?count={count}&page={page}
GET https://api.camoo.hosting/v1/tariffs/get/?count={count}&page={page}
Content-Type : multipart/form-data
{
}
{
"status" : OK,
"result" : {
"0" : {
"tariffs" : {
"0" : {
"id" : 123,
"..." : ...
}
},
"has_more" : 1
}
}
}
Error
CAMOO API raises errors for many reasons (authentication, invalid parameters, network / server errors etc.). In case of failed action, we always return the status KO.
Error
Content-Type : multipart/form-data
{
}
{
"status" : KO,
"result" : {
"message" : login failed
}
}