Huspot API not working in production build/domain




I am making a server-side request (lambda function) using an hapikey to hubspot’s update contact property API endpoint.

The request works while running locally and in the development build on AWS S3, and returns {“status”: “success”, “response_data”: “{“vid”:******,“isNew”:false}”}.

However, when running on production and staging builds I am receiving {“status”: “success”, “response_data”: null} and the contact is not updating.

It seems to be an issue with domain or CORS, but I have set up cross-domain tracking to no avail.

Any help would be greatly appreciated.


Hi @LukeP,

Could you give me a bit more info on the request you’re making? It sounds like you’re making a request to the contacts API. It’d be helpful to have the entire request and response you’re referring to. Additionally, since you mentioned CORS, it’s good to note that HubSpot does not support cross-origin (CORS) AJAX requests, since making the request client-side using JavaScript would expose any authentication you’re using for the request.


The request is being made server-side with python so it’s likely not causing a CORS issue.

The company I’m working had already set up the configuration of calling the lambda functions so it’s unlikely that there is an issue there.

Here is the python request:

def putHubspotContact(data):
url = ‘’ + data[‘email’] + '/'
params = {‘hapikey’: HS_API_KEY}
response =, data=json.dumps(data[‘payload’]), params=params)
print(response.url, json.dumps(data[‘payload’]), response.text )
return response.text

the request:
{“properties”: [
“property”: “email”,
“value”: ""
“property”: “user_id”,
“value”: “auth0|hash”
“property”: “registration_status”,
“value”: “Registered and validated”
“property”: “email_verified”,
“value”: true

the response:

Request URL:https://[omitted]
Request Method:POST
Status Code:200 OK
Remote Address:[omitted]
Referrer Policy:no-referrer-when-downgrade
Response Headers
view source
Date:Tue, 03 Oct 2017 19:40:06 GMT
Via:1.1 (CloudFront)
X-Cache:Miss from cloudfront

Thanks for your help!