Problem with sending ajax request for create new contact


Hi All,

I have just setup my developer account and trying to create new contact with ajax json request. Below is code i am using.

function createContact() {
var properties = [{ “property”: “email”, “value”: "" }, { “property”: “firstname”, “value”: “nisha” },
{ “property”: “lastname”, “value”: “shah” }]
url: ‘’,
data: JSON.stringify(properties),
type: ‘Post’,
timeout: 5000,
success: function (data) {
return false;
error: function (data) {

I am always getting message from error. no success. Any idea what’s wrong with my code? does anyone have working example with ajax post request from html page?


Hi @nishashah

Our APIs do not support cross-origin AJAX requests, as it risks exposing whatever authentication you’re using to your visitors. Any requests to our APIs need to be made server-side.