Bulk update contacts
/contacts/bulkCreates or changes up to 1,000 contacts by their address in one call, each on its own.
Needs the permissioncontacts:write
Each item is written as Update a contact by email would write it, and the answer has one result per item, in the order sent. One item failing doesn’t stop the others.
Items are saved 100 at a time. If a batch couldn’t be saved, its items answer not_done, and you can simply send them again.
Every item counts against 5,000 a minute per key. One bulk call runs at a time per person and two per organisation, imports in the app included. Otherwise the answer is 429 busy with Retry-After: 30.
The body can be up to 8 MB. An item with a custom field your organisation doesn’t have answers error with unknown_field, and the others are still written.
Body
contactslistrequired- Up to 1,000 contacts, each with its
emailand the other fields Create a contact takes.
Returns
A list with a result for each item:
indexnumber- Its place in what you sent, from 0.
statusstringcreated,updated,unchangedorerror.idstring- The contact, unless
statusiserror. codestring- With
error: why, as the errors below, ornot_donefor an item to send again.messagesays it in words.
Errors
400bad_request- The body isn’t
{ "contacts": [ … ] }. 400too_many- More than 1,000 items.
401invalid_key- The key is wrong, expired or revoked. With no Authorization header at all, the code is
missing_credentials. 403missing_scope- The key doesn’t have
contacts:write. TheX-Required-Scopeheader names what’s missing. 413too_large- The request body is over 8 MB.
429rate_limited- More than 120 requests a minute from this key. Wait for
Retry-Afterseconds. 429rate_limited- More than 5,000 items this minute.
Retry-Aftersays when to try again. 429busy- Another bulk call or import is running. Try again after
Retry-After, 30 seconds.