Error 500 on createOrUpdate


#1

I am attempting to call the contacts/v1/contact/createOrUpdate endpoint and am receiving an internal error 500 response.

Here is my request:

req { method: ‘POST’,
headers:
{ ‘Content-Type’: ‘application/json’,
‘User-Agent’: ‘node-hubspot’ },
encoding: null,
form: {},
uri: ‘https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/test@test.com/?hapikey=**********’ }

And here is the response:

statusCode 500
Hubspot API error response: {“status”:“error”,“message”:“internal error”,“correlationId”:“",“requestId”:"*”}

I was able to successfully reach the contacts/v1/lists/all/contacts/all endpoint.

The docs mentioned that 500 error codes should be brought up here. Is there anything wrong with my request?

(Note: I am doing this in Meteor and using this npm module: https://github.com/launchthought/node-hubspot/)

Thanks,
-Seth


#2

Hi @SethWeb

Do you have the JSON data you’re using for that request? Those 500 errors usually indicate a formatting issue with the JSON so seeing that data could help track this down.


#3

Hey @dadams

I took another look at the JSON and realized I needed to stringify it. That fixed it. Thank you for your help.