APIs & Integrations

vkopanja
Member

Can't create multiple contacts at once

Hey all,

I keep getting an error when I try creating multiple contacts at once using the REST API, this is the error I receive:

{ "status": "error", "message": "Json node is missing child properties", "correlationId": "f7b5c670-83f8-4b83-95c4-4ef919fb3934", "requestId": "04f694cc15b6745dce29ba9eec371fff" }

And this is the example data I call the /contacts/v1/contact/ endpoint with:

[{ "email": "user3@test.com", "properties": [{ "property": "firstname", "value": "Test" }, { "property": "lastname", "value": "Three" }] }, { "email": "user2@test.com", "properties": [{ "property": "firstname", "value": "Test" }, { "property": "lastname", "value": "Two" }] }, { "email": "user@test.com", "properties": [{ "property": "firstname", "value": "User" }, { "property": "lastname", "value": "Test" }] }]

Any help or ides why am I getting this? I’m using the Content-Type: application/json header as well.

edit: never mind, you have to call the explicit url with batch in it, for multiple contact creation, sigh :sweat_smile:

0 Upvotes
2 Replies 2
3PETE
HubSpot Employee
HubSpot Employee

Can't create multiple contacts at once

@vkopanja Here is our documentation on it.

I think you are using the wrong endpoint. Here is an example post call:
https://api.hubapi.com/contacts/v1/contact/batch/?hapikey=demo

0 Upvotes
vkopanja
Member

Can't create multiple contacts at once

Yup, I used the wrong endpoint, I edited my OP. Silly me :smile:

0 Upvotes