Skip to content

Deals

Deals represent sales opportunities moving through your pipeline. Assign deals to workflows and stages, track value and currency, map buying-committee contact roles, and forecast revenue.

FieldTypeDescription
iduuidUnique identifier for the deal
account_iduuidID of the account that owns the deal
created_byuuidID of the user who created the deal
namestringName of the deal
descriptionstringFree-form description of the deal
stage_iduuid?ID of the deal workflow stage the deal is currently in
stage_labelstringDisplay label of the current stage (read-only, derived from the stage)
stage_colorstringColor token of the current stage (read-only, derived from the stage)
stage_closedboolTrue when the current stage is a closed stage, meaning the deal is no longer open (read-only, derived from the stage)
stage_wonboolTrue when the current stage is a closed-won stage; a closed stage with this false is closed-lost (read-only, derived from the stage)
workflow_iduuid?ID of the deal workflow whose stages this deal moves through
company_iduuid?ID of the company associated with the deal
company_namestringName of the associated company (read-only, derived from the company)
assigned_touuid?ID of the user the deal is assigned to
assigned_namestringName of the assigned user (read-only, derived from the user)
valueint?Monetary value of the deal in integer minor units (cents) of the currency
probabilityintProbability of winning the deal, as an integer percentage from 0 to 100
expected_close_datestring?Expected close date as an ISO 8601 date (YYYY-MM-DD)
closed_atdatetime?ISO 8601 timestamp when the deal was closed; null while open
closed_reasonstringReason recorded when the deal was closed
notesstringFree-form notes about the deal
tagsstring[]List of tag labels applied to the deal
custom_fieldsobjectCustom field values keyed by field definition, validated against the account’s deal custom field definitions
currencystring?ISO 4217 currency code for the deal value One of: USD, EUR, GBP, JPY, CAD, AUD, CHF, CNY, SEK, NOK, DKK, NZD, SGD, HKD, KRW, MXN, BRL, INR, ZAR, TRY, PLN, CZK, HUF, ILS, THB, MYR, PHP, IDR, RON, BGN, ISK
timezonestring?IANA timezone name used for interpreting the deal’s dates
created_atdatetimeISO 8601 timestamp when the deal was created
updated_atdatetimeISO 8601 timestamp when the deal was last updated

Endpoint: deals-calendar

Endpoint: deals-close

FieldTypeRequiredDescription
idstringNoID of the deal to close
stage_idstringNoID of the closed stage (won or lost) to move the deal into
reasonstringNoReason for closing the deal
Terminal window
curl -X POST https://api.driftwoodapp.com/api/deals-close \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'

Endpoint: deals-contacts-add

Endpoint: deals-contacts-list

Endpoint: deals-contacts-remove

Endpoint: deals-create

FieldTypeRequiredDescription
namestringYesName of the deal
descriptionstringNoFree-form description of the deal
stage_idstring?NoID of the workflow stage to place the deal in; defaults to the workflow’s default stage when omitted
workflow_idstring?NoID of the deal workflow to use; defaults to the account’s default workflow when omitted
company_idstring?NoID of the company to associate with the deal
assigned_tostring?NoID of the user to assign the deal to
valueint?NoMonetary value of the deal in integer minor units (cents) of the currency
probabilityint?NoWin probability as an integer percentage from 0 to 100; values outside the range are clamped. Defaults to the stage’s default probability when omitted
expected_close_datestring?NoExpected close date as an ISO 8601 date (YYYY-MM-DD)
currencystring?NoISO 4217 currency code for the deal value; defaults to the account’s default currency when a value is set and this is omitted One of: USD, EUR, GBP, JPY, CAD, AUD, CHF, CNY, SEK, NOK, DKK, NZD, SGD, HKD, KRW, MXN, BRL, INR, ZAR, TRY, PLN, CZK, HUF, ILS, THB, MYR, PHP, IDR, RON, BGN, ISK
timezonestring?NoIANA timezone name used for interpreting the deal’s dates
notesstringNoFree-form notes about the deal
tagsstring[]NoList of tag labels to apply to the deal
custom_fieldsobject?NoCustom field values keyed by field definition, validated against the account’s deal custom field definitions
Terminal window
curl -X POST https://api.driftwoodapp.com/api/deals-create \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "..."}'

Endpoint: deals-delete

Get a monthly revenue forecast from open deals’ expected close dates

Section titled “Get a monthly revenue forecast from open deals’ expected close dates”

Endpoint: deals-forecast

FieldTypeRequiredDescription
monthsintNoNumber of months to forecast forward, from 1 to 24; defaults to 12 and is clamped to 24
Terminal window
curl -X POST https://api.driftwoodapp.com/api/deals-forecast \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'

Endpoint: deals-get

Get deal pipeline insights with summary, win rate, and breakdowns

Section titled “Get deal pipeline insights with summary, win rate, and breakdowns”

Endpoint: deals-insights

FieldTypeRequiredDescription
start_datestringYesStart of the reporting period as an ISO 8601 date (YYYY-MM-DD)
end_datestringYesEnd of the reporting period as an ISO 8601 date (YYYY-MM-DD), inclusive
compare_start_datestringNoStart of an optional comparison period as an ISO 8601 date (YYYY-MM-DD); supply with compare_end_date to include comparison metrics
compare_end_datestringNoEnd of an optional comparison period as an ISO 8601 date (YYYY-MM-DD), inclusive
Terminal window
curl -X POST https://api.driftwoodapp.com/api/deals-insights \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"start_date": "...", "end_date": "..."}'

Endpoint: deals-list

FieldTypeRequiredDescription
searchstringNoText to match against deal name and related fields
tagsstring[]NoFilter to deals having all of these tag labels
stage_idstring?NoFilter to deals in this workflow stage
company_idstring?NoFilter to deals associated with this company
assigned_tostring?NoFilter to deals assigned to this user
is_closedbool?NoFilter by closed state; true returns closed deals, false returns open deals, omit for all
cursorstringNoOpaque pagination cursor returned by a previous list response
limitintNoMaximum number of deals to return in the page
Terminal window
curl -X POST https://api.driftwoodapp.com/api/deals-list \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'

Get pipeline value and deal counts broken down by stage

Section titled “Get pipeline value and deal counts broken down by stage”

Endpoint: deals-pipeline-stats

FieldTypeRequiredDescription
workflow_idstring?NoID of the workflow to compute pipeline stats for; defaults to the account’s default workflow when omitted
Terminal window
curl -X POST https://api.driftwoodapp.com/api/deals-pipeline-stats \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'

Endpoint: deals-reopen

Endpoint: deals-update

FieldTypeRequiredDescription
idstringNoID of the deal to update
workflow_idstring?NoID of the workflow to move the deal to; when changed without a stage_id the deal moves to the new workflow’s default stage
namestring?NoNew name for the deal
descriptionstring?NoNew description for the deal
stage_idstring?NoID of the workflow stage to move the deal to; changing the stage resets probability to the stage default
company_idstring?NoID of the company to associate; pass an empty string to clear the association
assigned_tostring?NoID of the user to assign; pass an empty string to clear the assignment
valueint?NoMonetary value of the deal in integer minor units (cents) of the currency
probabilityint?NoWin probability as an integer percentage from 0 to 100; values outside the range are clamped
expected_close_datestring?NoExpected close date as an ISO 8601 date (YYYY-MM-DD)
currencystring?NoISO 4217 currency code for the deal value One of: USD, EUR, GBP, JPY, CAD, AUD, CHF, CNY, SEK, NOK, DKK, NZD, SGD, HKD, KRW, MXN, BRL, INR, ZAR, TRY, PLN, CZK, HUF, ILS, THB, MYR, PHP, IDR, RON, BGN, ISK
timezonestring?NoIANA timezone name used for interpreting the deal’s dates
notesstring?NoNew notes for the deal
tagsstring[]NoReplacement list of tag labels for the deal
custom_fieldsobject?NoCustom field values to merge, validated against the account’s deal custom field definitions
Terminal window
curl -X POST https://api.driftwoodapp.com/api/deals-update \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
CodeDescription
deals.invalid_idInvalid id
deals.invalid_stage_idInvalid stage id
deals.reason_requiredReason required
deals.not_foundNot found
deals.name_requiredName required
deals.invalid_workflow_idInvalid workflow id
deals.invalid_stageInvalid stage
deals.invalid_company_idInvalid company id
deals.invalid_assigned_toInvalid assigned to
deals.invalid_custom_fieldsInvalid custom fields
deals.dates_requiredDates required
deals.invalid_start_dateInvalid start date
deals.invalid_end_dateInvalid end date
deals.invalid_compare_start_dateInvalid compare start date
deals.invalid_compare_end_dateInvalid compare end date