May 29, 20193:42 AM - edited May 29, 20192:13 PM
Member
Problem with contacts batch api
Im using `/contacts/v1/contact/batch/` to create contacts in bulk. But, I noticed sometimes I never get response through the webhook, it just silently fail eventhough `/contacts/v1/contact/batch/` returns 202 accepted. Also, occassionally the contact is created but I don't get notified via webhook, which is troublesome for us since there is no way to check the status.
Would it be possible to create new endpoint that can create contacts in batch but synchronously (You can put a limit of course)? Instead of fire and forget via batch.
Could you give me a little bit more detail about how you're making these requests? In your batch creation, how many contacts are you passing through the API at any given time? Our documentation on batch creation: https://developers.hubspot.com/docs/methods/contacts/batch_create_or_update states that you should send 100 contacts or fewer in the batch size. And just to clarify, all of the contacts are actually being created, correct? Your issue is that you're not being notified via webhook of a contact creation? Could you link me to one of those contacts? And also let me know where you have the webhook set up? You could also look at recently created contacts: https://developers.hubspot.com/docs/methods/contacts/get_recently_created_contacts to match up against the webhook notifications. For what it's worth, I'm happy to provide the feedback about the synchronous vs. asynchronous behaviors.
Thanks and let me know if you have other questions here.
You are correct, Im not getting notified via webhooks. Yes, I split it to 100 contacts per batch. The behaviour is mostly consistent, but occasionally I get missing notification for some contacts.
Would it be possible to add a new endpoint which accepts requests like `contacs/v1/contact` but in batch, which shouldn't fail all the request if there is one error?
I think the better solution here is just to make sure that all webhook notifications are in fact going out. That way you'll still be able to batch update/create 100 at a time, and still be confident that all webhooks are being sent out. If there are missing notifications, I'll have one of our engineers investigate it.
Could you give me an example of a contact that you created through batch creation, but then whose webhook notification didn't go out? Feel free to link me here to the contact and workflow / app that's sending the webhook. Or also feel free to send me a direct message.
It seems that it doesn't always happen to a specific contact, but rather randomly. When I tried to sync the same contact again, it works. I guess this is understandable as messages can be lost especially through queues/batching nature. In the end, we implement a scheduled check to verify whether the contacts are synced or not.