Skip to content

Deals

A deal represents a sales opportunity in your pipeline.

Create a Deal

POST /crm/deals
json
{
  "name": "Acme Corp — Enterprise Plan",
  "stage_id": 1,
  "contact_id": 7,
  "company_id": 3,
  "lead_id": 12,
  "amount": 5000,
  "currency": "EUR",
  "expected_close_date": "2026-06-30",
  "assigned_to": 1,
  "notes": "Decision maker: Alice Martin"
}

Required fields: name, stage_id

Move Through the Pipeline

Move a deal from one stage to another:

PUT /crm/deals/{id}
json
{
  "stage_id": 3
}

If the target stage is marked is_won: true or is_lost: true, the won_at / lost_at fields are updated automatically.

Mark as Won

POST /crm/deals/{id}/won
  • Moves the deal to the first is_won: true stage in the pipeline
  • Records won_at
  • Clears lost_at

Mark as Lost

POST /crm/deals/{id}/lost
json
{
  "reason": "Insufficient budget"
}
  • Moves the deal to the first is_lost: true stage in the pipeline
  • Records lost_at and lost_reason
  • Clears won_at

Filter Deals

GET /crm/deals?stage_id=2&is_won=false&assigned_to=1
ParameterDescription
stage_idFilter by stage
assigned_toFilter by owner
company_idDeals for a company
contact_idDeals for a contact
lead_idDeals for a lead
is_wontrue for won deals
is_losttrue for lost deals

API v1.0