Funnels
Sales funnels and their stages — the Kanban structure deals move through. Through the API you list funnels, create and update a funnel together with its stages in a single request, delete funnels, and fetch the Kanban board with deals grouped by stage.
Funnel fields
A funnel carries name (up to 255 chars), description (up to 2000 chars, nullable) and status (draft, active, paused or archived).
Stages
Stages are created and updated together with the funnel in a single request; each stage carries name, type (new, in_progress, success or failed), color (up to 16 chars) and order.
Funnel board
The funnel board (/board) returns up to 50 deal cards per stage together with the stage aggregates (deals_count, total_amount); use the stage-level paginated endpoint to load more cards in a single column (perPage defaults to 50).
Endpoints
| Method | Path | Summary |
|---|---|---|
| GET | /v1/funnelsList company funnels | List company funnels |
| POST | /v1/funnelsCreate a funnel (with stages) | Create a funnel (with stages) |
| POST | /v1/funnels/{funnel}Update a funnel | Update a funnel |
| DELETE | /v1/funnels/{funnel}Delete a funnel | Delete a funnel |
| GET | /v1/funnels/{funnel}/boardKanban board of the funnel with deals grouped by stage | Kanban board of the funnel with deals grouped by stage |
| GET | /v1/funnels/{funnel}/stages/{stage}/dealsPaginated deals for a single stage | Paginated deals for a single stage |
Examples
Create a funnel with stages
Request
curl -X POST https://api.aisar.app/v1/funnels \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Sales",
"description": "Primary sales pipeline",
"status": "active",
"stages": [
{ "name": "Lead", "type": "new", "color": "#3B82F6", "order": 1 },
{ "name": "Negotiation", "type": "in_progress", "color": "#F59E0B", "order": 2 },
{ "name": "Won", "type": "success", "color": "#22C55E", "order": 3 }
]
}'Response
{
"data": {
"message": "Funnel created.",
"funnel": {
"id": 1,
"company_id": 1,
"name": "Sales",
"slug": "sales",
"description": "Primary sales pipeline",
"steps": 3,
"updated_at": "2026-03-15T10:00:00.000000Z",
"stages": [
{ "id": 1, "funnel_id": 1, "name": "Lead", "type": "new", "order": 1, "color": "#3B82F6", "stale_after_days": null, "wip_limit": null },
{ "id": 2, "funnel_id": 1, "name": "Negotiation", "type": "in_progress", "order": 2, "color": "#F59E0B", "stale_after_days": null, "wip_limit": null },
{ "id": 3, "funnel_id": 1, "name": "Won", "type": "success", "order": 3, "color": "#22C55E", "stale_after_days": null, "wip_limit": null }
]
}
}
}Funnel Kanban board
Request
curl https://api.aisar.app/v1/funnels/1/board \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"data": {
"funnel": { "id": 1, "name": "Sales" },
"stages": [
{
"id": 1,
"name": "Lead",
"type": "new",
"order": 1,
"color": "#3B82F6",
"stale_after_days": null,
"wip_limit": null,
"deals_count": 1,
"total_amount": "5000.00",
"deals": [
{
"id": 501,
"title": "Office renovation",
"amount": "5000.00",
"currency": "KZT",
"status": "open",
"expected_close_date": null,
"stage_changed_at": "2026-03-15T10:00:00.000000Z",
"age_days": 3,
"is_stale": false,
"channel": "whatsapp",
"contact_name": "Aigerim Bekova",
"contact_avatar": null,
"responsible_user_name": "Aidos",
"last_message_preview": "Hello, can we schedule a call?",
"last_message_at": "2026-03-15T09:40:00.000000Z",
"conversations_count": 2
}
]
}
]
}
}Page through a stage column
Request
curl "https://api.aisar.app/v1/funnels/1/stages/1/deals?page=2&perPage=50" \
-H "Authorization: Bearer YOUR_API_TOKEN"Response
{
"data": {
"items": [
{
"id": 542,
"title": "Warehouse lease",
"amount": "12000.00",
"currency": "KZT",
"status": "open",
"expected_close_date": "2026-04-01",
"stage_changed_at": "2026-03-14T08:00:00.000000Z",
"age_days": 4,
"is_stale": false,
"channel": "telegram",
"contact_name": "Marat Ospanov",
"contact_avatar": null,
"responsible_user_name": "Aidos",
"last_message_preview": null,
"last_message_at": null,
"conversations_count": 1
}
],
"pagination": { "page": 2, "perPage": 50, "total": 120, "lastPage": 3 }
}
}