Deals
Pipeline deals with forecast categories. Stages are stored lowercase (negotiation) and returned as display names (Negotiation).
All endpoints require a Bearer JWT in the Authorization header plus an X-Workspace-Id header selecting the workspace.
/api/dealsAuth requiredList deals ordered by value. Stage accepts either the stored form (closed_won) or the display name.
Query Parameters
| Field | Type | Required | Note |
|---|---|---|---|
| stage | string | No | Stored or display stage name |
| owner | string | No | — |
| forecast_cat | string | No | commit | best | pipe | out | closed |
| limit | number | No | Default 100, max 300 |
Response
[
{
"id": 7,
"workspace_id": 1,
"ref": "D-007",
"title": "Enterprise plan",
"company": "Acme Corp",
"amount_cents": 12000000,
"amount": "$120k",
"stage": "Negotiation",
"forecast_cat": "commit",
"owner": "Jane",
"close_label": "2026-04-30"
}
]/api/deals/forecastAuth requiredQuarter forecast from live deals. Commit = proposal + negotiation at full value; best case adds discovery; pipeline = every open deal.
Query Parameters
| Field | Type | Required | Note |
|---|---|---|---|
| quota_cents | number | No | Default 100000000 ($1M) |
| weighted | boolean | No | Count deals at probability instead of full value |
Response
{
"quota_cents": 100000000,
"weighted": false,
"commit_cents": 12000000,
"best_case_cents": 20000000,
"pipeline_cents": 35000000,
"coverage": 0.35,
"deals": [ { "id": 7, "ref": "D-007", "category": "commit" } ]
}/api/deals/pipelineAuth requiredPipeline board: one column per stage with its deals and column totals.
Response
[
{
"stage": "Negotiation",
"count": 2,
"total_cents": 17000000,
"total": "$170k",
"deals": [ { "id": 7, "ref": "D-007", "title": "Enterprise plan" } ]
}
]/api/deals/{deal_id}Auth requiredGet a deal with its contact, pinned notes, and follow-up tasks.
Response
{
"id": 7,
"ref": "D-007",
"title": "Enterprise plan",
"company": "Acme Corp",
"contact": { "id": 3, "name": "Jane Doe", "email": "jane@acme.com" },
"amount_cents": 12000000,
"stage": "Negotiation",
"probability": 70,
"forecast_cat": "commit",
"notes": [ { "id": 1, "body": "Legal reviewing MSA" } ],
"tasks": [ { "id": 2, "ref": "T-002", "title": "Send revised quote" } ]
}/api/deals/{deal_id}/moveAuth requiredMove a deal to a new stage. Accepts display (Closed Won) or stored (closed_won) form. Returns 422 for an unknown stage.
Request Body
| Field | Type | Required | Note |
|---|---|---|---|
| stage | string | Yes | lead | qualified | discovery | proposal | negotiation | closed_won | closed_lost |
Response
{
"id": 7,
"ref": "D-007",
"stage": "Closed Won",
"forecast_cat": "closed"
}/api/deals/{deal_id}/categoryAuth requiredSet an analyst forecast-category override for a deal. Returns 422 for an unknown category.
Request Body
| Field | Type | Required | Note |
|---|---|---|---|
| category | string | Yes | commit | best | pipe | out | closed |
Response
{
"id": 7,
"ref": "D-007",
"stage": "Discovery",
"forecast_cat": "commit"
}