POST /contacts/batch runs up to 1000 operations in one request. Use it for a
first load, and for a nightly sync.
The four operations
Name the contact with
id, or with an identity such as external_id.
A batch
Read the response
summary.errors and the results array.
Import 40,000 contacts
1
Create the attributes first
Send
POST /attributes for each attribute that your rows carry. Kai
refuses an attribute key that the workspace does not define.2
Split the rows into batches of 1000
A larger request would run for minutes and can stop at a proxy timeout
with no report of what it did.
3
Send the batches one after the other
Two batches that run at the same time can hold the same person and make
two contacts. Send them in sequence.
4
Log the failed rows
Record
index and error.type for each failed operation. Correct those
rows and send them again.Repeat a batch safely
Anupsert matches on identity, so the same batch sent twice updates the same
contacts. It does not make copies.
Give every row an external_id if your system has one. It is the strongest
match, because you control it. See Identity.