The NameCheap API is an interface for accessing your NameCheap account data using HTTP and XML. The API makes it easy to create web and desktop applications that integrate with your account and perform operations like domain check, registration and renewals.
Some potential application ideas:
Before you enable API access, you should know about our environments.
There are two environments for using NameCheap API, which are production and sandbox. You are first advised to create an account in our sandbox environment, enable and test the API there before pointing your application at production. The only change you may need to do to point your application to production is to start using the appropriate URL.
We have a test server setup that will function like NameCheap.com.
http://www.sandbox.namecheap.com/
It is independent of production environment. You first should create an account in the sandbox and enable API to test it. Following is the service url for sandbox environment.
https://api.sandbox.namecheap.com/xml.response
We can't stress enough, but, please test your API against our sandbox environment before pointing it to production. We would like to avoid service disruptions in production caused by untested code.
Following is the service url for production environment
https://api.namecheap.com/xml.response
HTTPS Secure Connection
Please note the use of https:// in the URL above. All NameCheap API communication is encrypted over HTTPS. We recommend establishing a secure connection with the API entry point before sending sensitive data.
To enable API access for your account in production, login to your NameCheap account follow these steps:
My Account > Manage Profile pageManage Profile - API Access page, enter your account passwordEnable API AccessFor enabling API on the sandbox you should follow the same steps on the sandbox environment.
You can easily access the API be sending your parameters as query string to the service URLs.
https://api.sandbox.namecheap.com/xml.response ?ApiUser=ncuser &ApiKey=apikey &UserName=ncuser &ClientIp=121.22.123.22 &Command=namecheap.domains.check &DomainList=domain1.com,domain2.com
The above call will return an XML with the response which you can parse to obtain the results. You can look at the API Reference for all available commands and required parameters.