Deals API

Endpoints for listing, creating, updating and deleting deals, with paging, search and pipeline filters.

Deals

GET/api/deals

Every deal in the organization.

Auth: SessionPermission: deals:read
POST/api/deals

Create a deal.

Auth: SessionPermission: deals:write

Body

title*stringName of the deal.
value*numberDeal value, zero or above.
stage*stringOne of your organization's pipeline stages.
probability*number0 to 100.
openDate*stringWhen the deal opened.
contact*stringThe id of the contact this deal belongs to.
descriptionstringLonger description.
commentstringFree-text note.
closeDatestringWhen the deal closed or is expected to.
customFieldsobjectValues for any custom deal fields.

Returns. The created deal.

PUT/api/deals

Bulk import deals.

Auth: Session — administrators onlyPermission: deals:write

Body

(body)*DealImportRow[]An array of deals. Each row needs title, value and a configured stage, plus your organization's required custom deal fields. Link the record with contactEmail or contactPhone (or contact, a contact id) — the contact must already exist in your organization.

Returns. { success, failed, errors, failures, imported }. `failures` gives a { row, reason } entry per rejected row, numbered against the array you sent. Probability defaults to the stage's configured probability and openDate defaults to today.

GET/api/deals/paginated

One page of deals, with search and filters applied.

Auth: SessionPermission: deals:read

Query parameters

pagenumber1-based page number. Defaults to 1.
limitnumberRecords per page. Defaults to 10.
searchQuerystringMatches the deal title.
filtersjsonA JSON array of filter rows. Supported fields: stage, month.

Returns. { deals, totalPages, currentPage } with each deal's contact included.

GET/api/deals/{dealId}

A single deal with its contact.

Auth: SessionPermission: deals:read

Returns. { deal }

PUT/api/deals/{dealId}

Update a deal.

Auth: SessionPermission: deals:write

Returns. The updated deal. Moving a deal into a won stage can trigger the external database sync if it is configured.

DELETE/api/deals/{dealId}

Delete a deal.

Auth: SessionPermission: deals:delete
GET/api/deals/refresh-state

A lightweight signal the interface uses to tell whether the deal list has changed.

Auth: SessionPermission: deals:read