Skip to main content
POST
Update companies in batch
Update up to 100 existing companies in the workspace, identified by their id. Each record takes the same fields as update a company, native fields and customFieldValues alike, and is updated on its own: a record that fails, for instance because its id matches no company you can access, does not prevent the others from being updated. See batch requests for the 100-record limit and how to read the response.
Fields with a list of values (groups, addresses, emails, phones, urls) will replace the old values. This means that you must provide the entire list of values for that field, not just the values you want to add.
groups replaces the groups of the company, and removing a group deletes data. A group you can access that is missing from groups is removed from the company, together with the company’s custom field values in that group. Leave groups out to keep the company’s groups unchanged.This is the opposite of create companies in batch, where groups only adds.
Each succeeded result lists, in removedGroups, the groups the update removed the company from, empty when it removed none.

Company names

A company name is unique in the workspace, so a rename can fail:
  • A record renaming a company to the name of another company fails, with the same error as update a company.
  • Records renaming different companies to the same new name all fail, whatever their order: the batch cannot give one name to two companies.
  • A company keeps its current name while the batch is checked. Renaming Acme to Acme Corp and another company to Acme in the same batch fails the second record: send it in a later request.
Names match exactly, case included: renaming a company to acme while another is named Acme succeeds.

Records for the same company

The records of one company, by its id or by the id of a company merged into it, are merged into one update, in the order you sent them: the last value given for a field wins, and customFieldValues are merged group by group, the last value given for a custom field winning. Two records giving the same company the same name are one rename, not a collision. The merged update is validated as a whole: if it is invalid, every record of that company fails with that error. Each of those records gets its own result, with the company as finally updated. This is not always the same as sending the records one after the other: a record setting a custom field value in a group fails, together with the other records of its company, when a later record of that company leaves the group out of groups, where sent first on its own it would succeed. Each updated company comes back in full, as in the response of update a company. A record that was updated but not entirely, for instance because the company could not be added to one of its groups, succeeds with a warnings list explaining what was not applied.

Authorizations

Authorization
string
header
required

API key for authentication

Headers

Idempotency-Key
string

A unique key, such as a UUID, that makes retrying this request safe: a retry with the same key and body returns the original response without running the operation again. Keys are kept for 24 hours after the request completes.

Maximum string length: 255
Example:

"8e03978e-40d5-43e8-bc93-6894a57f9324"

Body

application/json
records
object[]
required
Maximum array length: 100

Response

The outcome of each record, with each updated company.

data
object
required
Example:
deprecations
string[]
Example: