Misar IO Docs

Pipeline API

Retrieve the full pipeline board grouped by stage and move deals between stages — api.misar.io/reach/api/pipeline.

Overview

The pipeline represents your deals organized into a Kanban board. Each deal occupies exactly one stage at a time. The seven stages form a standard sales funnel from initial contact through close or loss.

Pipeline stages (in order):

StageDescription
newLead identified, not yet contacted
contactedOutreach sent
interestedLead engaged positively
meetingDemo or call scheduled
proposalProposal or quote submitted
closedDeal won
lostDeal lost — excluded from pipeline revenue

Base URL: https://api.misar.io/reach


GET /api/pipeline

Returns the full pipeline board — all deals grouped by stage — plus revenue totals. Optionally filtered by workspace.

Required scope

deals:read

Query parameters

workspaceIdstring

Filter the board to a specific workspace UUID.

Response

{
  "board": {
    "new":       [{ "id": "uuid", "lead_name": "Priya Sharma", "lead_email": "[email protected]", "value": 5000, "currency": "USD", "stage": "new", "status": "new", "conversation_id": null, "campaign_id": null, "workspace_id": null, "created_at": "2026-05-21T10:00:00Z", "closed_at": null, "notes": null }],
    "contacted": [],
    "interested": [],
    "meeting":   [],
    "proposal":  [],
    "closed":    [],
    "lost":      []
  },
  "revenue": {
    "pipeline": 135000,
    "closed": 45000
  },
  "stages": ["new", "contacted", "interested", "meeting", "proposal", "closed", "lost"]
}
boardobject

Object with one key per stage (new through lost). Each value is an array of PipelineDeal objects ordered by created_at descending.

revenue.pipelinenumber

Sum of value for all deals not in closed or lost stages.

revenue.closednumber

Sum of value for deals in the closed stage.

stagesstring[]

Ordered list of all stage identifiers.

lost deals are excluded from both revenue.pipeline and revenue.closed. They appear in the board.lost array for reference but do not affect revenue totals.

Example

curl "https://api.misar.io/reach/api/pipeline" \
  -H "Authorization: Bearer msr_your_key_here"

POST /api/pipeline

Moves a deal to a new stage. This is the canonical "drag-and-drop" action for the Kanban UI. When the target stage is "closed", closed_at is automatically set.

Required scope

deals:write

Request body

dealIdstringrequired

UUID of the deal to move.

newStagestringrequired

Target stage. Must be one of: "new" | "contacted" | "interested" | "meeting" | "proposal" | "closed" | "lost".

Response

{
  "ok": true,
  "deal": {
    "id": "uuid",
    "stage": "proposal",
    "lead_email": "[email protected]"
  }
}

Status codes

CodeMeaning
200Deal moved to new stage
400Invalid JSON
404Deal not found or does not belong to authenticated user
422Validation error (invalid dealId or unknown newStage)

Example

curl -X POST https://api.misar.io/reach/api/pipeline \
  -H "Authorization: Bearer msr_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"dealId": "550e8400-e29b-41d4-a716-446655440000", "newStage": "meeting"}'

Pipeline deal object

Each deal in the board has the following shape:

idstring

UUID of the deal.

lead_namestring | null

Lead display name.

lead_emailstring

Lead email address.

valuenumber

Deal value (integer, in the deal's currency).

currencystring

ISO 4217 3-letter currency code.

stagestring

Current pipeline stage.

statusstring

Deal status (mirrors stage for most deals).

conversation_idstring | null

Linked conversation UUID, if any.

campaign_idstring | null

Linked campaign UUID, if any.

workspace_idstring | null

Workspace UUID, if assigned.

created_atstring

ISO 8601 timestamp when the deal was created.

closed_atstring | null

ISO 8601 timestamp when stage was set to "closed". null otherwise.

notesstring | null

Free-text deal notes.