Description
Adds a Contact to the domain using the details provided.
Parameters
| Name |
Data Type |
Required / Optional |
Description |
|---|
| auth-userid |
Integer |
Required |
Authentication Parameter |
| api-key |
String |
Required |
Authentication Parameter |
| name |
String |
Required |
Name of the Contact
|
| company |
String |
Required |
Name of the Company
|
| email |
String |
Required |
Email address of the Contact |
| address-line-1 |
String |
Required |
First line of address of the Contact
|
| city |
String |
Required |
Name of the City
Note
Max length 64 characters
|
| country |
String |
Required |
Country code as per ISO 3166-1 alpha-2
Note
For UkServiceContact Contact type, the country code can only be GB (United Kingdom), IM (Isle of Man), JE (Jersey) or GG (Guernsey).
|
| zipcode |
String |
Required |
ZIP code
Note
Max length 10 characters
Attention
ZIP Code will be validated against the Country selected during the contact create process. An invalid zipcode will return an error message.
|
| phone-cc |
String |
Required |
Telephone number country code
Note
Between 1-3 digits
Attention
Only valid telephone number country code will be accepted.
|
| phone |
String |
Required |
Telephone number
|
| customer-id |
Integer |
Required |
The Customer under whom you want to create the Contact |
| type |
String |
Required |
The Contact Type. This can take following values:
|
| address-line-2 |
String |
Optional |
Second line of address of the Contact |
| address-line-3 |
String |
Optional |
Third line of address of the Contact |
| state |
String |
Optional |
Name of the State
|
| fax-cc |
String |
Optional |
Fax number country code
|
| fax |
String |
Optional |
Fax number
|
| attr-name |
Map[name] |
Optional |
Mapping key of any extra information to be associated for the contact that is being added. Refer the description of attr-value. |
| attr-value |
Map[value] |
Required |
Mapping value of the extra details required to be associated with a particular Contact before registering a domain name. This together with attr-name shall contain the extra details.
|
HTTP Method
POST
Example Test URL Request
https://test.httpapi.com/api/contacts/add.json?auth-userid=0&api-key=key&name=abc&company=company&[email protected]&address-line-1=address1&city=city&country=nn&zipcode=0&phone-cc=0&phone=0&customer-id=0&type=Contact
Response
Returns the Contact Id (Integer) of newly added Contact. Multiple Contacts can be added for the same Name and Company Name behavior.
In case of any errors, a status key with value as ERROR alongwith an error message will be returned.
Sample error message when Single Field is invalid
{"status":"ERROR","message":"{telnocc=TelephoneNo Country Code is invalid}"}
Sample error message when Multiple Fields are invalid
{"status":"ERROR","message":"{telnocc=TelephoneNo Country Code is invalid, zip=Postal Code is invalid}"}