AISARAISAR
REST API

Funnels

Sales funnels and their stages — the Kanban structure deals move through. Stages are created and updated together with the funnel in a single request. The funnel board (`/board`) returns the first page of deals per stage; use the stage-level paginated endpoint to load more cards in a single column.

Endpoints

MethodPath
GET/v1/funnels

List company funnels

POST/v1/funnels

Create a funnel (with stages)

POST/v1/funnels/{funnel}

Update a funnel

DELETE/v1/funnels/{funnel}

Delete a funnel

GET/v1/funnels/{funnel}/board

Kanban board of the funnel with deals grouped by stage

GET/v1/funnels/{funnel}/stages/{stage}/deals

Paginated deals for a single stage

Examples

Create a funnel with stages

Request

bash
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

json
{
  "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

bash
curl https://api.aisar.app/v1/funnels/1/board \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

json
{
  "data": {
    "funnel": { "id": 1, "name": "Sales" },
    "stages": [
      {
        "id": 1,
        "name": "Lead",
        "deals": [
          {
            "id": 501,
            "title": "Office renovation",
            "amount": "5000.00",
            "stage_changed_at": "2026-03-15T10:00:00.000000Z",
            "contact": { "id": 123, "display_name": "Aigerim Bekova" },
            "responsible_user": { "id": 5, "name": "Aidos" },
            "conversations_count": 2
          }
        ]
      }
    ]
  }
}