> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anycrm.anyreach.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Kanban Board

> Kanban board columns without loading every deal.

Per visible stage returns the true count + pipeline value (from the
``insights_pipeline_by_stage`` aggregate view) plus only the top ``limit``
deals (a bounded SELECT). Replaces the old unbounded ``/deals?select=*``
board fetch that returned the org's entire deal set.

Faceted filters (``owner`` / ``stage`` / ``account`` as comma-separated ids,
``risk`` flag, ``close_from`` / ``close_to`` and ``created_from`` /
``created_to`` date windows) narrow the columns.

Returns board columns **without loading every deal**: per visible stage, the true count and pipeline value (from the `insights_pipeline_by_stage` aggregate view) plus only the top `limit` deals — replacing an older `/deals?select=*` fetch that loaded the org's entire pipeline into memory (see the CPU-incident history for why this matters).

<Note>
  The query parameters below accept plain strings, so the auto-rendered parameter list doesn't show their exact semantics: `owner`, `stage`, `account`, and `geo` are each **comma-separated id lists**, not single ids. `risk=true` restricts to deals where `close_date` is past or `last_activity_at` is 14+ days old. `created_from`/`created_to` treat the end date as inclusive of the whole day. `limit` applies **per stage column**, not to the total response, and is capped at `200`.
</Note>

### Auth

Requires a CRM read [scope](/authentication#scopes) and an active organization on the token. Any of `contacts:read`, `deals:read`, `companies:read`, or `activities:read` qualifies, as does any `*:manage` scope — manage implies read.

### Response

Array of column objects, one per visible stage:

| Field     | Type      | Description                                                                                                                                                                                                                                                                     |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `stage`   | `object`  | `{id, name, color, position, is_won, is_lost, is_hidden}`.                                                                                                                                                                                                                      |
| `count`   | `integer` | True count for the stage. When any filter/search is active, this is the exact matched count instead of the precomputed aggregate.                                                                                                                                               |
| `value`   | `number`  | Pipeline value for the stage. Under an active filter, this is the sum of only the loaded slice (approximate if more rows exist beyond `limit`).                                                                                                                                 |
| `deals`   | array     | Up to `limit` deals, each `{id, name, value, currency, close_date, stage_id, last_activity_at, health_score, geo_scope, accounts: {name}, deal_stages: {...}, contacts: [...]}` — `contacts` is every linked contact (`id, first_name, last_name, title, email`), not just one. |
| `hasMore` | `boolean` | `true` if `count > deals.length`.                                                                                                                                                                                                                                               |


## OpenAPI

````yaml GET /deals/board
openapi: 3.1.0
info:
  title: anycrm-api
  version: 0.0.1
servers: []
security: []
tags:
  - name: Customer Intelligence
    description: >-
      Company research and ICP-fit scoring — create a research run, track its
      progress, and read back scored companies as leads.
  - name: Outreach
    description: >-
      The cold-email management console — domains, mailboxes, and campaigns — as
      a thin control plane over the SalesForge stack.
  - name: AnyCard
    description: >-
      Authenticated CRUD for AnyCard, the org's digital business-card /
      lead-capture product.
  - name: AnyCard Events
    description: >-
      Event-attribution analytics for AnyCard — which captured leads converted,
      broken down by source, owner, and deal.
  - name: AnyCard Share Links
    description: >-
      Unauthenticated endpoints reached by anyone who scans a QR code or opens a
      shared AnyCard link.
  - name: AI
    description: >-
      A streaming (SSE) AI chat endpoint with account-commit actions it can take
      on the caller's behalf.
  - name: Analytics Assistant
    description: >-
      The natural-language analytics assistant — a guarded text-to-SQL loop
      (SSE) that answers ad-hoc questions over the org's CRM data as a
      least-privilege, read-only database role.
  - name: Account Readiness
    description: >-
      Account Readiness Profiles — AI-scored signals on whether an account is
      ready for outreach or expansion, computed via a Temporal workflow.
  - name: Integrations
    description: >-
      Pipedream Connect — issuing connect tokens and managing the org's
      connected third-party accounts.
  - name: Feedback
    description: >-
      User-submitted platform feedback (bug reports, feature requests) — global,
      not scoped to one organization.
  - name: Public Media
    description: >-
      Unauthenticated image reads for publicly-embeddable assets (card photos,
      inline email images) — allowlisted by key shape; everything else in the
      storage bucket stays private.
  - name: Service Health
    description: Service liveness.
paths:
  /deals/board:
    get:
      tags:
        - Deals
      summary: Get Deals Board
      description: >-
        Kanban board columns without loading every deal.


        Per visible stage returns the true count + pipeline value (from the

        ``insights_pipeline_by_stage`` aggregate view) plus only the top
        ``limit``

        deals (a bounded SELECT). Replaces the old unbounded ``/deals?select=*``

        board fetch that returned the org's entire deal set.


        Faceted filters (``owner`` / ``stage`` / ``account`` as comma-separated
        ids,

        ``risk`` flag, ``close_from`` / ``close_to`` and ``created_from`` /

        ``created_to`` date windows) narrow the columns.
      operationId: get_deals_board_deals_board_get
      parameters:
        - name: sort
          in: query
          required: false
          schema:
            type: string
            description: >-
              Field to sort each column's deals by: `value`, `close_date`,
              `last_activity`, or `name`; unrecognized values fall back to
              `value`.
            default: value
            title: Sort
          description: >-
            Field to sort each column's deals by: `value`, `close_date`,
            `last_activity`, or `name`; unrecognized values fall back to
            `value`.
        - name: dir
          in: query
          required: false
          schema:
            type: string
            description: 'Sort direction: `asc` or `desc`.'
            default: desc
            title: Dir
          description: 'Sort direction: `asc` or `desc`.'
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Free-text search narrowing the board to matching deals.
            title: Q
          description: Free-text search narrowing the board to matching deals.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            description: >-
              Max deals to return per stage column (not the total response);
              capped at 200.
            default: 50
            title: Limit
          description: >-
            Max deals to return per stage column (not the total response);
            capped at 200.
        - name: owner
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Comma-separated owner user ids to filter to.
            title: Owner
          description: Comma-separated owner user ids to filter to.
        - name: stage
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Comma-separated pipeline stage ids to filter to.
            title: Stage
          description: Comma-separated pipeline stage ids to filter to.
        - name: account
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Comma-separated account ids to filter to.
            title: Account
          description: Comma-separated account ids to filter to.
        - name: geo
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Comma-separated geographic scopes to filter to.
            title: Geo
          description: Comma-separated geographic scopes to filter to.
        - name: risk
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Restrict to at-risk deals (close date past, or no activity in 14+
              days).
            default: false
            title: Risk
          description: >-
            Restrict to at-risk deals (close date past, or no activity in 14+
            days).
        - name: close_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Only include deals with `close_date` on/after this date.
            title: Close From
          description: Only include deals with `close_date` on/after this date.
        - name: close_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Only include deals with `close_date` on/before this date
              (inclusive of the whole day).
            title: Close To
          description: >-
            Only include deals with `close_date` on/before this date (inclusive
            of the whole day).
        - name: created_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Only include deals created on/after this date.
            title: Created From
          description: Only include deals created on/after this date.
        - name: created_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Only include deals created on/before this date (inclusive of the
              whole day).
            title: Created To
          description: >-
            Only include deals created on/before this date (inclusive of the
            whole day).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````