Opportunities
Track sales pipeline — deals, their stages, values, and expected close dates.
GET
/opportunitiesList opportunities with pagination and filters.
Query Parameters
| Param | Type | Description |
|---|---|---|
| page | int | Page number (default: 1) |
| pageSize | int | Items per page (default: 20) |
| search | string | Search by opportunity name |
| status | string | Stage filter: prospecting, qualification, proposal, negotiation, closed_won, closed_lost |
| accountId | uuid | Filter by associated account |
| isArchived | boolean | Show archived (default: false) |
| ownerId | string | Filter by owner |
Request
curl -X GET "https://kashew.ai/api/v1/opportunities?page=1&status=negotiation" \
-H "Authorization: Bearer kshw_xxxxxxxx_xxxxx..."POST
/opportunitiesCreate a new opportunity.
Request Body
{
"name": "Acme Corp — Enterprise Deal",
"accountId": "543d15e7-...",
"leadId": null,
"value": 50000,
"currency": "USD",
"stage": "proposal",
"probability": 60,
"expectedCloseDate": "2026-07-15",
"description": "Enterprise license for 50 seats"
}201Response
{
"id": "9854b730-41aa-4152-9296-c896c1ff00c0",
"name": "Acme Corp — Enterprise Deal",
"stage": "proposal",
"value": 50000,
"currency": "USD",
"created_at": "2026-05-20T10:30:00Z"
}GET
/opportunities/:idGet a single opportunity with account name and updates history.
curl -X GET "https://kashew.ai/api/v1/opportunities/9854b730-..." \
-H "Authorization: Bearer kshw_xxxxxxxx_xxxxx..."PUT
/opportunities/:idUpdate opportunity fields (stage, value, dates, etc.).
curl -X PUT "https://kashew.ai/api/v1/opportunities/9854b730-..." \
-H "Authorization: Bearer kshw_xxxxxxxx_xxxxx..." \
-H "Content-Type: application/json" \
-d '{"stage": "closed_won", "value": 55000, "probability": 100}'DELETE
/opportunities/:idDelete an opportunity permanently.
Pipeline Stages
| Stage | Description |
|---|---|
| prospecting | Initial outreach, qualifying interest |
| qualification | Confirmed fit, budget discussion |
| proposal | Proposal sent, awaiting decision |
| negotiation | Terms being negotiated |
| closed_won | Deal won ✓ |
| closed_lost | Deal lost ✗ |