11 useful methods for Namecheap API

0
614

Welcome Back to Shortlearner.com , In our previous post we saw how to create a Namecheap account and apply for API . Namecheap have some of its criteria when we apply for API. If we fulfill all of the criteria than namecheap provides us an API. Namecheap takes 48 working hours to check our criteria.

namecheap api using php

In Today’s post we will see how to configure the Namecheap API using Php and access all the namecheap activities like (Update DNS, Create NameServer, Information of Namecheap Account Holder, Account Balance, Buy domain , Buy SSL certificate, create another namecheap account, change password and also see all the domain which is buy frim particular API).
Now We see some of methods/functions which are helpful for Access all the above Namecheap activities .
We splits all the Methods into some categories, In the first category we discuss all the functions of domains.

getList function: we can see all the domains which are buy form a particular user with the help of getList function.

example

https://api.namecheap.com/xml.response?ApiUser=apiexample&
ApiKey=56b4c87ef4fd49cb96d915c0db68194&UserName=apiexample&
Command=namecheap.domains.getList&
ClientIp=192.168.1.109

Namecheap.domains.getContacts : by using this method we get all contact information for  the requested domain.
Example

https://api.namecheap.com/xml.response?ApiUser=apiexample&
ApiKey=56b4c87ef4fd49cb96d915c0db68194&UserName=apiexample&
Command=namecheap.domains.getContacts&ClientIp=192.168.1.109&
DomainName=domain1.com

Namecheap.domains.create : this is very useful function , we can register a new domain with the help of this methods. But there are some criteria  which is important to know before using this methods.

Namecheap recommend usingthe HTTP POST method for this method.
Example

https://api.namecheap.com/xml.response?ApiUser=apiexample&
ApiKey=56b4c87ef4fd49cb96d915c0db68194&UserName=apiexample&
Command=namecheap.domains.create&ClientIp=192.168.1.109&
DomainName=aa.us.com&Years=1&AuxBillingFirstName=John&AuxBillingLastName=Smith&
AuxBillingAddress1=8939%20S.cross%20Blv&AuxBillingStateProvince=CA&
AuxBillingPostalCode=90045&AuxBillingCountry=US&AuxBillingPhone=+1.6613102107&
AuxBillingEmailAddress=john@gmail.com&AuxBillingOrganizationName=NC&
AuxBillingCity=CA&TechFirstName=John&TechLastName=Smith&
TechAddress1=8939%20S.cross%20Blvd&TechStateProvince=CA&TechPostalCode=90045&
TechCountry=US&TechPhone=+1.6613102107&TechEmailAddress=john@gmail.com&
TechOrganizationName=NC&TechCity=CA&AdminFirstName=John&AdminLastName=Smith&
AdminAddress1=8939%cross%20Blvd&AdminStateProvince=CA&AdminPostalCode=9004&
AdminCountry=US&AdminPhone=+1.6613102107&AdminEmailAddress=joe@gmail.com&
AdminOrganizationName=NC&AdminCity=CA&RegistrantFirstName=John&
RegistrantLastName=Smith&RegistrantAddress1=8939%20S.cross%20Blvd&
RegistrantStateProvince=CS&RegistrantPostalCode=90045&RegistrantCountry=US&
RegistrantPhone=+1.6613102107&RegistrantEmailAddress=jo@gmail.com&
RegistrantOrganizationName=NC&RegistrantCity=CA&AddFreeWhoisguard=no&
WGEnabled=no&GenerateAdminOrderRefId=False&IsPremiumDomain=True&
PremiumPrice=206.7&EapFee=0

namecheap.domains.getTldList: this methods returns a list of tld domain.

Example

https://api.namecheap.com/xml.response?ApiUser=apiexample&
ApiKey=56b4c87ef4fd49cb96d915c0db68194&UserName=apiexample&
Command=namecheap.domains.gettldlist&
ClientIp=192.168.1.109

namecheap.domains.setContacts : this method is used for set all the information of requested domain.
Example

https://api.namecheap.com/xml.response?ApiUser=apiexample&
ApiKey=56b4c87ef4fd49cb96d915c0db68194&UserName=apiexample&
Command=namecheap.domains.setContacts&ClientIp=192.168.1.109&
DomainName=domain1.us&AuxBillingFirstName=Dan&AuxBillingLastName=Smith&
AuxBillingAddress1=8939%20S.cross%20Bl&AuxBillingStateProvince=CA&
AuxBillingPostalCode=90045&AuxBillingCountry=US&
AuxBillingPhone=+1.6613102107&AuxBillingEmailAddress=john@gmail.com&
AuxBillingOrganizationName=NC&AuxBillingCity=California&TechFirstName=John&
TechLastName=Smith&TechAddress1=8939%20S.cross%20Bl&TechStateProvince=CA&
TechPostalCode=90045&TechCountry=US&TechPhone=+1.6613102107&
TechEmailAddress=john@gmail.com&TechOrganizationName=NC&
TechCity=California&AdminFirstName=John&AdminLastName=Smith&
AdminAddress1=8939%20S.cross%20Blvd&AdminStateProvince=CA&A
dminPostalCode=9009&AdminCountry=US&AdminPhone=+1.6613102107&
AdminEmailAddress=john@gmail.com&AdminOrganizationName=NC&
AdminCity=California&RegistrantFirstName=John&RegistrantLastName=Smith&
RegistrantAddress1=8939%20S.cross%20Blvd&RegistrantStateProvince=CS&
RegistrantPostalCode=90045&RegistrantCountry=US&RegistrantPhone=+1.6613102107&
RegistrantEmailAddress=jo@gmail.com&RegistrantOrganizationName=NC&
RegistrantCity=California&RegistrantNexus=C11&RegistrantNexusCountry=In
&RegistrantPurpose=P1

namecheap.domains.check : this methods is used for check the availability of domains.

Example

https://api.namecheap.com/xml.response?ApiUser=apiexample&
ApiKey=52b4c87ef7fd49cb96a915c0db68124&UserName=apiexample
&Command=namecheap.domains.check&ClientIp=192.168.1.109&
DomainList=us.xyz

namecheap.domains.reactivate : This method is used for reactive an expired domain.
Example

https://api.namecheap.com/xml.response?ApiUser=apiexample&
ApiKey=56b4c87ef4fd49cb96d915c0db68194&UserName=apiexample&
Command=namecheap.domains.reactivate&ClientIp=192.168.1.109&
DomainName=models.tv&YearsToAdd=1&IsPremiumDomain=true&
premiumprice=650

namecheap.domains.renew : this method is used for renew an expiring domain.

Example

https://api.namecheap.com/xml.response?ApiUser=apiexample&
ApiKey=56b4c87ef4fd49cb96d915c0db68194&UserName=apiexample&
Command=namecheap.domains.renew&ClientIp=192.168.1.109&
DomainName=models.tv&Years=1&IsPremiumDomain=true&
PremiumPrice=650

namecheap.domains.getRegistrarLock : This method is used to Get the registrar lock status for a specific domain.
Example

https://api.namecheap.com/xml.response?ApiUser=apiexample&
ApiKey=56b4c87ef4fd49cb96d915c0db68194&UserName=apiexample&
Command=namecheap.domains.getRegistrarLock&ClientIp=192.168.1.109&
DomainName=domain1.com

namecheap.domains.setRegistrarLock : This method  Sets the Registrar Lock status for a  specific domain.

Example

https://api.namecheap.com/xml.response?ApiUser=apiexample&A
piKey=56b4c87ef4fd49cb96d915c0db68194&UserName=apiexample&
Command=namecheap.domains.setRegistrarLock&ClientIp=192.168.1.109&
DomainName=domain1.com&
LockAction=unlock

namecheap.domains.getInfo : This method is  Returns information about the requested domain.
Example

https://api.namecheap.com/xml.response?ApiUser=apiexample&
ApiKey=56b4c87ef4fd49cb96d915c0db68194&UserName=apiexample&
Command=namecheap.domains.getinfo&ClientIp=192.168.1.109&
DomainName=domain1.com