Create a deal
Creates a deal in a pipeline stage.
Endpoint
POST/deals
Body
| Name | Type | Required | Description |
|---|---|---|---|
organization_id | integer | Yes | Organization to create the deal in. |
name | string | Yes | Deal name. |
pipeline_id | integer | Yes | Deal pipeline. Must be visible to the key's user. |
pipeline_stage_id | integer | Yes | Stage in that pipeline. |
contact_id | integer | Yes | Contact of the deal. |
amount | number | No | Value. Default 0. Overwritten when deal products change. |
currency_id | integer | No | Currency. Fills the display fields and exchange_rate. |
status | string | No | open, won or lost. |
company_id | integer | No | Linked company. |
owned_by_user_id | integer | No | Owner. |
expected_close_date | string | No | ISO 8601 date-time. |
custom_fields_by_key | object | No | Custom field values keyed by field key. |
tags | array | No | { id } of the organization's deal tags. |
Fields not in the deal object are rejected. created_by_user_id is set to the API key's user.
Request
Response
json
Creating a deal records its first stage in the stage history and triggers the organization's "deal created" automations.
Errors
| Status | When |
|---|---|
400 Bad Request | A required field is missing, an unknown field is sent, or a custom field value is invalid. |
403 Forbidden | organization_id is not accessible with your key, or pipeline_id is a private pipeline the key's user cannot see. |
Report an issue with this documentation
Please log in to report issues with our documentation.