Skip to main content
POST
Create a deal
Create a new object of a given type in a group. Set the objectType path parameter to the name of the object type you want to create — Deals, Projects, Applications, or any other object type defined in the group. See Custom objects to find the object types available in a group. The body is the same for every object type: the native fields (name, people, companies) plus a customFieldValues object holding the custom fields defined for that object type in the group.
Applications
Custom field names in customFieldValues must match the custom fields defined for that object type in the group. An unknown field name fails the whole request with a 422 Unprocessable Entity response naming the offending field.

Authorizations

Authorization
string
header
required

API key for authentication

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
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 deal created in the workspace.

data
object
required

A deal in the workspace.

Example:
deprecations
string[]
Example: