Document Version: v1.9.4

VPS.NET RESTful API Documentation

VPS Cloud Sites—Next Generation Web Hosting

This guide outlines the basic principles of using the VPS.NET RESTful API to manage your account and cloud servers. If you have any questions about using this system, please don't hesitate to contact the VPS.NET support team.

This documentation is program language-independent and our examples will use command-line CURL to send the requests to VPS.NET

  1. Authentication
  2. Requesting Data
  3. API Functions:

API Functions: Domain Registration

GET Domains #

Gets the list of all registered domains on you account.

Domain Check Availability #

Checks the availability of the specified domain name.

	  {
                  "tlds": [ 'com', 'ca', 'us' ],
                  "domain_name": "yourdomain",
                  "suggestion": true
          }
	

Where:

tlds
Array of TLDs for which the domain name availability needs to be checked.
domain_name
Domain name that you need to check the availability for.
suggestion
Mention if domain name suggestions are required or not.
	  {
              "domains":
              {
                    "yourdomain.com": {"classkey": "domcno","status": "regthroughothers"},
                    "yourdomain.ca": {"classkey": "dotca","status": "available"},
                    "yourdomain.us": {"classkey": "domus","status": "regthroughothers"}
              },
              "suggestion":
              {
                    "SaveYourDomain": {"com": "notavailable","us": "available"},
                    "Your-Blog-Domain": {"com": "available","us": "available"},
                    "YourBlogDomain": {"com": "notavailable","us": "available"},
                    "ChooseYourDomain": {"com": "notavailable","us": "available"},
                    "RegisterYourDomain": {"com": "notavailable","us": "available"},
                    "Your-Domain-Names": {"com": "notavailable","us": "available"},
                    "Save-Your-Domain": {"com": "available","us": "available"},
                    "EnterYourDomain": {"com": "notavailable","us": "available"},
                    "Choose-Your-Domain": {"com": "notavailable","us": "available"},
                    "Your-Domain": {"com": "notavailable","us": "available"}
              }
          }
        

REGISTER Domain(s) #

	  {
		"domains":
                {
                    "yourdomain.com": "1",
                    "yourdomain.us": "1"
                },
                "auto_renew": 1,
                "protect_privacy": 1,
                "contact":
                {
                    "full_name": "Full Name",
                    "company": "VPS",
                    "email_address": "name@vps.net",
                    "address1": "your address",
                    "address2": "",
                    "address3": "",
                    "city": "Chicago",
                    "state": "Illinois",
                    "country": "US",
                    "zip_code": "50000",
                    "phone_code": "17",
                    "phone_number": "5006070"
		}
	  }

Where:

domains
Required. An array with domain name and number of years for which you wish to register
auto_renew
Required.
protect_privacy
Required.
contact
Required. Contact for the domain(s) using the details provided (see below).

Contact details:

full_name
Required. Name of the contact.
company
Required. Name of the company (Optional in case of .Eu Contact).
email_address
Required. Email address of the contact.
address1
Required. First line of address of the contact.
address2
Optional. Second line of address of the contact.
address3
Optional. Third line of address of the contact.
city
Required. Name of the City.
state
Optional. Name of the state.
country
Required. Country Code as per ISO 3166-1 alpha-2.
zip_code
Required. ZIP code.
phone_code
Required. Telephone number country code.
phone_number
Required. Telephone number.

Additional details depending on TLD:

TRANSFER Domain #

	  {
		"domain": "yourdomain.com",
                "auth_code": "domain_secret_code",
                "auto_renew": 1,
                "protect_privacy": 1,
                "contact":
                {
                    "full_name": "Full Name",
                    "company": "VPS",
                    "email_address": "name@vps.net",
                    "address1": "your address",
                    "address2": "",
                    "address3": "",
                    "city": "Chicago",
                    "state": "Illinois",
                    "country": "US",
                    "zip_code": "50000",
                    "phone_code": "17",
                    "phone_number": "5006070"
		}
	  }

Where:

domain
Required. A domain name you wish to transfer
auth_code
Required. Authorization Code (a.k.a. Domain Secret) of the domain name that you want to transfer
auto_renew
Required.
protect_privacy
Required.
contact
Required. Contact for the domain(s) using the details provided (see above).

GET properties for a Domain #

See above for example output and field definitions

UPDATE contact for a Domain #

	  {
            "contact":
                {
                    "full_name": "Full Name",
                    "company": "VPS",
                    "email_address": "name@vps.net",
                    "address1": "your address",
                    "address2": "",
                    "address3": "",
                    "city": "Chicago",
                    "state": "Illinois",
                    "country": "US",
                    "zip_code": "50000",
                    "phone_code": "17",
                    "phone_number": "5006070"
		}
	  }

Where:

{CONTACT_TYPE}
Required. A type of contact: registrant (Registrant Details), admin (Admin Details), tech (Technical Details) or billing (Billing Details)

RENEW Domain #

UPDATE Domain NS #

	  {
            "ns":
                [
                    "dns1.vps.net",
                    "dns2.vps.net"
		]
	  }

SET Privacy Protection for a Domain #

SET Auto Renew for a Domain #