Deals API
Create, list, update, and delete deals in the MisarReach pipeline — api.misar.io/reach/api/deals.
Overview
Deals represent sales opportunities tracked in the MisarReach Kanban pipeline. Each deal is linked to a lead (by email), and optionally to a conversation, campaign, or contact.
Base URL: https://api.misar.io/reach
GET /api/deals
Returns a paginated list of deals for the authenticated user, with a revenue summary.
Required scope
deals:read
Query parameters
statusstringFilter by deal status. One of: "interested" | "meeting" | "proposal" | "closed" | "lost".
limitnumberdefault: 50Maximum number of deals to return (1–100).
offsetnumberdefault: 0Pagination offset (number of records to skip).
Response
{
"deals": [
{
"id": "uuid",
"lead_email": "[email protected]",
"lead_name": "Priya Sharma",
"value": 15000,
"currency": "USD",
"status": "proposal",
"notes": "Demo scheduled for next Tuesday.",
"conversation_id": "uuid-or-null",
"campaign_id": "uuid-or-null",
"created_at": "2026-05-21T10:00:00Z",
"closed_at": null
}
],
"total": 12,
"revenue": {
"total": 180000,
"closed": 45000,
"pipeline": 135000
}
}revenue.totalnumberSum of value across all deals (any status), in the deal's own currency.
revenue.closednumberSum of value for deals with status = "closed".
revenue.pipelinenumberSum of value for deals not yet closed or lost.
Example
curl "https://api.misar.io/reach/api/deals?status=proposal&limit=20" \
-H "Authorization: Bearer msr_your_key_here"POST /api/deals
Creates a new deal. Returns the created deal with HTTP 201.
Required scope
deals:write
Request body
leadEmailstringrequiredLead's email address. Used to identify the contact in the pipeline.
leadNamestringLead's display name.
valuenumberdefault: 0Deal value in the smallest currency unit (e.g., cents for USD). Non-negative integer.
currencystringdefault: USDISO 4217 3-letter currency code (e.g., "USD", "EUR", "INR").
notesstringFree-text notes on this deal (max 5,000 characters).
conversationIdstringUUID of a conversation to link this deal to. The conversation's deal_id field is updated automatically.
campaignIdstringUUID of a campaign to associate this deal with.
contactIdstringUUID of a contact record to link.
Response
{
"ok": true,
"deal": {
"id": "uuid",
"status": "new",
"lead_email": "[email protected]",
"value": 15000
}
}New deals are created with status = "new" and stage = "new".
Example
curl -X POST https://api.misar.io/reach/api/deals \
-H "Authorization: Bearer msr_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"leadEmail": "[email protected]",
"leadName": "Priya Sharma",
"value": 15000,
"currency": "USD",
"notes": "Responded positively to cold email. Schedule demo."
}'PATCH /api/deals/:id
Updates the status, value, or notes of an existing deal. Only the fields provided in the request body are modified.
When status is set to "closed", the closed_at timestamp is automatically set to the current time.
Required scope
deals:write
Path parameters
idstringrequiredUUID of the deal to update.
Request body
statusstringNew deal status. One of: "interested" | "meeting" | "proposal" | "closed" | "lost".
valuenumberUpdated deal value (non-negative integer).
notesstringUpdated free-text notes (max 5,000 characters).
Response
{
"ok": true,
"deal": {
"id": "uuid",
"status": "closed",
"value": 15000,
"lead_email": "[email protected]"
}
}Status codes
| Code | Meaning |
|---|---|
200 | Deal updated |
400 | Invalid UUID format |
404 | Deal not found or does not belong to the authenticated user |
422 | Validation error in request body |
Example
curl -X PATCH https://api.misar.io/reach/api/deals/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer msr_your_key_here" \
-H "Content-Type: application/json" \
-d '{"status": "closed", "notes": "Contract signed."}'Deal status values
| Status | Description |
|---|---|
new | Default when created. Lead has been identified. |
contacted | Outreach sent but no reply yet. |
interested | Lead has responded positively. |
meeting | A call or demo has been scheduled. |
proposal | A proposal or quote has been sent. |
closed | Deal won. closed_at is set. |
lost | Deal lost. Excluded from revenue pipeline totals. |
The pipeline board groups deals by stage, which mirrors status. Use POST /api/pipeline to move a deal's stage (e.g., drag-and-drop in the UI). Use PATCH /api/deals/:id to update the status directly via API.