Skip to main content
POST
Create deals in batch
Create up to 100 deals in a group. Each record takes the same fields as create a deal and is created on its own: a record that fails, for instance because of an unknown custom field, does not prevent the others from being created. See batch requests for the 100-record limit and how to read the response. Each deal comes back in full, as in the response of create a deal. A batch targets one object type in one group, given by the path. An object type that does not exist in the group fails the whole request with a 404, whose message lists the object types of the group. If the API key cannot create deals in the group, every record fails.
Deals are never matched with existing ones: two records with the same name, or a record named like an existing deal, create separate deals. A batch retried after a timeout or a network error creates every deal again. Send an Idempotency-Key header, so that a retry replays the first response instead.
People and companies are given by ID, and must already be in the group: an unknown one, or one not in the group, is ignored. To link people or companies you are importing, create them first with create people in batch or create companies in batch, and use the IDs they return. The deals of a request are created together with their people and companies: if that fails, every record fails and no deal is created. A record that succeeded but whose custom field values could not all be set carries 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"

Path Parameters

groupId
string
required

The ID of the group the deals belong to. Can be retrieved from the List groups endpoint.

Required string length: 40
objectType
string
required

The name of a deal custom field that can be retrieved from the List group custom fields endpoint.

Maximum string length: 500

Body

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

Response

The outcome of each record, with each created deal.

data
object
required
Example:
deprecations
string[]
Example: