APIs & Integrations

drgr
メンバー

Contacts API 200 SUCCESS nothing happens

I’m able to create and update contacts using the /contacts/v1/contact/createOrUpdate/email/:email_id route, but when I try to update/create multiple contacts using the /contacts/v1/contact/batch/ route, nothing happens. I am getting back a 200 response code with no response content as expected, but after waiting a couple hours, nothing is updated.

Additionally, when using the /contacts/v1/lists/:list_id/add route, i’m getting a 200 response code, but there is no response content (the documentation says there should be some response content), and the contacts are not getting added to the list.

Since I’m not getting any error messages in the reponse, I’m not sure how to debug this issue.

4件の返信
Anonymous
適用対象外

Contacts API 200 SUCCESS nothing happens

Same problem with Company Creation, same solution !

0 いいね!
Dadams
HubSpot Employee
HubSpot Employee

Contacts API 200 SUCCESS nothing happens

Hi @drgr

Are you including the content-type: application/json header in your requests? The batch endpoint should return a 202 response on success, not 200, but you may be getting that 200 if the header is missing.

drgr
メンバー

Contacts API 200 SUCCESS nothing happens

I am not, but the documentation says it should return a 200 not a 202, and the /contacts/v1/contact/createOrUpdate/email/:email_id endpoint works for me, returns a 200 with json content, and I’m not including the content header there either.

0 いいね!
drgr
メンバー

Contacts API 200 SUCCESS nothing happens

Adding the Content-Type header fixed the problem. Weird that some endpoints require the content-type and others don’t. Thank you so much for the help.

0 いいね!