latestOpenAPI 3.1.02026-08-233001841.3 MB

0dcf3303e9d7

opportunities

Create an opportunity

Create an opportunity, optionally linked to an existing lead.

custom.FIELD_ID (optional): Set custom fields by setting custom.FIELD_ID to the field value, where FIELD_ID is the ID of the custom field, e.g.:

{ "custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c": "value", "custom.cf_8wtBWsdRU2Fur7GDnEeXQ7ra2Vu7R4hG1SNYdiEhh0F": "other value" }

If a custom field has accepts_multiple_values: true, the entire value will be replaced. For example, given an Opportunity has a Custom Choice Field with value ["A", "B"], adding choice "C" would mean setting the value to ["A", "B", "C"].

Note that using the custom field dict or the custom.FIELD_NAME syntax (instead of custom field IDs) is deprecated and will be removed from the API. See Custom Fields for more details.

post/opportunity/

Request body

confidenceinteger nullable
contact_idstring nullable
created_bystring nullable
date_createdstring date-time nullable
date_wonstring date-time nullable

If not set on the resource or in the request, date_won will be set automatically to today's date when setting status_id to a status with type won. The x-tz-offset header, used to pass your timezone's UTC offset, will be taken into account.

lead_idstring nullable

Opportunities belong to exactly one Lead. If not provided, a new lead will be created (appearing as "Untitled" in the UI).

notestring nullable

Plaintext/markdown version of the note. If note_html is also provided in the same request, this value is ignored and note is derived from the HTML instead.

note_htmlstring nullable

Rich-text HTML version of the note. When set, note is automatically populated with the plaintext version (tags become markdown), overriding any note value passed in the same request.

pipeline_idstring nullable

Specify which pipeline this opportunity should belong to. When supplied without status_id, the opportunity will be created with the first available status of that pipeline. When supplied with status_id, the status must belong to the specified pipeline or a 400 error will be returned. If the pipeline does not exist, a 400 error will be returned. See the Pipelines API.

status_idstring nullable

Post a status_id to create an opportunity with a specific status. If omitted, the organization's default (first) status will be used (or the first status of the pipeline_id if provided). See the Opportunity Status API.

user_idstring nullable
valueinteger nullable
value_period'one_time' | 'monthly' | 'annual'

Response

Successful response

annualized_expected_valueinteger nullable required
annualized_valueinteger nullable required
confidenceinteger required
contact_idstring nullable required
contact_namestring nullable
created_bystring nullable required
created_by_namestring nullable
date_createdstring date-time required
date_loststring date-time nullable required
date_updatedstring date-time required
date_wonstring date nullable required
expected_valueinteger nullable required
idstring required
is_stalledboolean
lead_idstring required
lead_namestring nullable
notestring nullable required
note_htmlstring nullable required
organization_idstring required
pipeline_idstring nullable
pipeline_namestring nullable
status_display_namestring
status_idstring required
status_labelstring
status_type'won' | 'lost' | 'active'
updated_bystring nullable required
updated_by_namestring nullable
user_idstring required
user_namestring nullable
valueinteger nullable required
value_currencystring nullable
value_formattedstring nullable
value_period'one_time' | 'monthly' | 'annual' required