Skip to main content
PATCH
Update a deal
Update an existing deal in the workspace, updating only the provided fields and leaving the rest of the deal’s data unchanged.
Fields with a list of values (people, companies) 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.

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
objectId
string
required

The ID of the deal to update.

Required string length: 40

Body

application/json
name
string

The name of the deal.

Maximum string length: 1000
Example:

"Project Alpha"

companies
object[]

The companies associated with the deal.

Maximum array length: 20
Example:
people
object[]

The people associated with the deal.

Maximum array length: 20
Example:
customFieldValues
object

The custom field values associated with the deal. The format is the following:

The format of the custom field value depends on the type of the custom field:

  • textField: string, eg: "Foo"
  • numericField: number or numeric string, eg: 42 or "42"
  • dateField: ISO 8601 string (YYYY-MM-DD), eg: "2021-01-01"
  • singleSelect: string (option label), eg: "Active"
  • multipleSelect: array of strings (option labels), eg: ["B2B", "B2C"]
  • userField: array of objects with either id (workspace user id) or email (workspace user email) property, eg: [{"id": "usr_a23373bb-5296-4c59-b2e8-8f121707d562"}, {"email": "jane@example.com"}]

Passing a null value or an empty array will unset the custom field value.

Example:

Response

The updated deal in the workspace.

data
object
required

A deal in the workspace.

Example:
deprecations
string[]
Example: