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

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 : application/json
{
	 "email" : "myemail",
	 "password" : "mypassword"
}
{
	 "status" : "OK",
	 "result" : {
	 	 "message" : "Authentification successful",
	 	 "access_token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjM..."
	 }
}

Check availabiliity

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 separed with commas

Check availabiliity

https://api.camoo.hosting/v1/domains/check-availibility

POST https://api.camoo.hosting/v1/domains/check-availibility
Content-Type : application/json
{
  "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 : application/json
{
  "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 : application/json
{
  "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

Suspend

https://api.camoo.hosting/v1/domains/suspend/{id}

{
  "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/{id}

{
  "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/{id}

{
  "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 : application/json
{
  "domain-name" : "example.cm"
}

{
  "status" : OK,
  "result" : 1
}

Transfer

Transfers a domain name.

Note
  • 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/tranfer

POST https://api.camoo.hosting/v1/domains/tranfer
Content-Type : application/json
{
  "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 : application/json
{
  "domain-name" : "example.cm"
}

{
  "status" : OK,
  "result" : TERMS OF USE ...
}

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
  • Max length 255 characters
  • The Name should be complete first name and last name
company string required Name of the Company
Note
  • If you don't have a company you should mention N/A or NA : Not Available or Not Applicable for this parameter.
email 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
  • Between 1-3 digits
phone integer required Telephone number
Note
  • Between 4-12 digits
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
  • Between 1-3 digits
fax integer optional Fax number
Note
  • Between 4-12 digits
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 : application/json
{
  "name" : "John Doe",
  "company" : "Doe Ltd.",
  "email" : "new-contact@domain.cm",
  "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
  • Max length 255 characters
  • The Name should be complete first name and last name
company string required Name of the Company
Note
  • If you don't have a company you should mention N/A or NA : Not Available or Not Applicable for this parameter.
email 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
  • Between 1-3 digits
phone integer required Telephone number
Note
  • Between 4-12 digits
lang-pref string optional Language Code as per ISO
Note
  • e.g. fr_FR or en_GB
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
  • Between 1-3 digits
fax integer optional Fax number
Note
  • Between 4-12 digits
terms boolean optional Accept Terms and Conditions and Privacy Policy to create an account

Adding Customer

https://api.camoo.hosting/v1/customers/add

POST https://api.camoo.hosting/v1/customers/add
Content-Type : application/json
{
  "name" : "John Doe",
  "company" : "Doe Ltd.",
  "email" : "new-contact@domain.cm",
  "address-1" : "Bastos",
  "city" : "Yaounde",
  "ccode" : "CM",
  "terms" : "1",
  "lang-pref" : "fr_FR",
  "zipcode" : "0000",
  "phone-cc" : "237",
  "phone" : "612345689",
  "state" : "Centre"
}

{
  "status" : OK,
  "result" :   {
    "id" : 123
  }
}

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
  • Max length 63 characters
domain-name string required Domain name under which the sud domain will be created
target string required The target forlder on the web space. If given target does not exist, the folder is created.
Note
  • The folder is/should be created under /home/user/target

Adding Sub-domain

https://api.camoo.hosting/v1/sub-domains/add

POST https://api.camoo.hosting/v1/sub-domains/add
Content-Type : application/json
{
  "name" : "dev",
  "domain-name" : "example.cm",
  "target" : "dev-folder"
}

{
  "status" : OK,
  "result" :   {
    "id" : 1234,
    "message" : Sub domain has been created
  }
}

Delete Sub-domain

Deletes a Sub domain to the domain using the provided sub domain 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/{id}

{
  "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/{id}

{
  "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
  • Allowed types are:
  • 'A'
  • 'AAAA'
  • 'CNAME'
  • 'NS'
  • 'MX'
  • 'TXT'
  • 'SVR'
  • 'SOA'
host string optional The host part of the domain name for which you need to add a record
Note
  • For record with @ host should be empty
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
  • relevant only for MX and SRV records
port optional The port number of the service
Note
  • relevant only for SRV records
weight optional A relative weight for records with the same priority
Note
  • relevant only for SRV records

Add Record

https://api.camoo.hosting/v1/dns/add-record

POST https://api.camoo.hosting/v1/dns/add-record
Content-Type : application/json
{
  "domain_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 : application/json
{
  "zone_id" : "123",
  "record_id" : "144"
}

{
  "status" : OK,
  "result" :   {
        "zone_id" : 123,
        "message" : DNS Record Successfully deleted
  }
}

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


{
  "status" : KO,
  "result" :   {
    "message" : login failed
  }
}