Skip to content

Deals & Pipeline

Deals track sales opportunities through stages. Pipelines group deals by entity and product.

Routes

GET /api/deals

List deals with filters.

Auth: Required
Query params:

ParamTypeDescription
company_idstringFilter by company
stagestringFilter by pipeline stage
pipelinestringFilter by pipeline (sales, lp_fundraise, sm_investors, osma_customers, recruiting)
assigned_tostringFilter by assigned user email
limitnumberDefault: 50

Response:

json
{
  "ok": true,
  "data": [
    {
      "id": "deal_a1b2c3d4",
      "company_id": "co_...",
      "contact_id": "ct_...",
      "title": "Acme Corp — $15k/mo",
      "stage": "proposal",
      "pipeline": "sales",
      "value": 15000,
      "probability": 60,
      "close_date": "2026-06-01",
      "assigned_to": "dani@sprintmode.co",
      "created_at": "..."
    }
  ]
}

GET /api/deals/:id

Get a single deal.

Auth: Required


POST /api/deals

Create a new deal.

Auth: Required
Request body:

FieldTypeRequiredDescription
titlestringyesDeal title
company_idstringnoAssociated company
contact_idstringnoPrimary contact
pipelinestringnoPipeline name
stagestringnoInitial stage
valuenumbernoDeal value
probabilitynumbernoWin probability (0–100)
close_datestringnoExpected close date
assigned_tostringnoAssignee email
notesstringnoNotes

Response: 201 Created


PATCH /api/deals/:id

Update deal fields: title, stage, value, probability, close_date, assigned_to, notes, won_at, lost_at, lost_reason.

Auth: Required


GET /api/pipelines

List all configured pipelines with their stage definitions.

Auth: Required
Response:

json
{
  "ok": true,
  "data": [
    {
      "id": "sales",
      "label": "Studios Sales",
      "owner": "Dani",
      "entity": "sprint_studios",
      "stages": [
        { "key": "lead", "label": "Lead" },
        { "key": "qualified", "label": "Qualified" },
        { "key": "proposal", "label": "Proposal" },
        { "key": "negotiation", "label": "Negotiation" },
        { "key": "closed_won", "label": "Closed Won" },
        { "key": "closed_lost", "label": "Closed Lost" }
      ]
    }
  ]
}

Pipelines: sales (Studios Sales), lp_fundraise (LP Fundraise), sm_investors (SM Investors), osma_customers (Osma Customers), recruiting (Recruiting)


GET /api/pipelines/:pipeline/summary

Get aggregate stats for a pipeline: deal counts, total value, and per-stage breakdown.

Auth: Required
Path params: pipeline — pipeline ID

Response:

json
{
  "ok": true,
  "data": {
    "pipeline": "sales",
    "label": "Studios Sales",
    "target": null,
    "stages": [
      {
        "key": "lead",
        "label": "Lead",
        "count": 12,
        "total_value": 0
      }
    ],
    "total_deals": 45,
    "total_value": 280000
  }
}

Sprint Mode LLC — Internal Platform Documentation