This page documents the canonical HTTP contract. Switch to the CLI example when you want the operator workflow.
A stage category determines Deal state. Creating a Deal in a won stage on a pipeline with marks_customer_on_win=true can mark direct Deal contacts as customers and exit linked account leads from prospecting sequences. The response is the created Deal; its organization, actor, and lifecycle history are server-owned.
Body parameters
namerequiredstring
Non-empty Deal name, at most 240 characters.
primary_company_id· optionalstring | null
Primary linked company ID.
company_ids· optionalarray<string>
Linked company IDs in this organization.
lead_ids· optionalarray<string>
Linked lead IDs in this organization.
owner_user_id· optionalstring | null
Active owner user in this organization.
amount· optionalobject | null
{value: decimal string, currency_code: three-letter currency code}.
pipeline_id· optionalstring | null
Pipeline and stage must be set together.
stage_id· optionalstring | null
Stage in the selected active pipeline.
expected_close_date· optionaldate | null
actual_close_date· optionaldate | null
next_step· optionalstring | null
custom_fields· optionalobject
Values validated against active Deal custom fields.
| Name | Type | Description |
|---|---|---|
| namerequired | string | Non-empty Deal name, at most 240 characters. |
| primary_company_id | string | null | Primary linked company ID. |
| company_ids | array<string> | Linked company IDs in this organization. |
| lead_ids | array<string> | Linked lead IDs in this organization. |
| owner_user_id | string | null | Active owner user in this organization. |
| amount | object | null | {value: decimal string, currency_code: three-letter currency code}. |
| pipeline_id | string | null | Pipeline and stage must be set together. |
| stage_id | string | null | Stage in the selected active pipeline. |
| expected_close_date | date | null | - |
| actual_close_date | date | null | - |
| next_step | string | null | - |
| custom_fields | object | Values validated against active Deal custom fields. |
Errors
| Status | Meaning |
|---|---|
| 400 | Invalid association, owner, pipeline, stage, or custom field. |
| 401 | Authentication required. |
| 403 | Missing deals:write scope. |
| 422 | Invalid Deal payload. |
