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

# List conversations

> Query WhatsApp conversations with filters. Results are returned by latest activity first and use cursor pagination.



## OpenAPI

````yaml /api/platform/v1/openapi-platform.yaml get /whatsapp/conversations
openapi: 3.1.0
info:
  title: Kapso Platform API
  version: 0.2.0
  description: >
    Build WhatsApp messaging into your product. Manage customers, connect phone
    numbers, send broadcasts, and handle conversations.
servers:
  - url: https://api.kapso.ai/platform/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Customers
    description: Manage customer accounts
  - name: Setup Links
    description: WhatsApp onboarding via embedded signup
  - name: Phone Numbers
    description: Connect and manage WhatsApp numbers
  - name: Webhooks
    description: Subscribe to WhatsApp events
  - name: Display Names
    description: Update WhatsApp business display names
  - name: Broadcasts
    description: |
      Send template messages at scale

      **Alpha**: This API is in alpha and subject to change
  - name: Conversations
    description: Manage conversation state
  - name: Media
    description: Upload media files for WhatsApp messaging
  - name: Users
    description: Manage project team members
  - name: Inbox Embeds
    description: Create and manage embeddable inbox access links
  - name: Webhook Deliveries
    description: View webhook delivery attempts and their status
  - name: External API Logs
    description: View logs of external API calls made by the project
  - name: Log Search
    description: Search log events across API, Meta, workflow, and webhook sources
  - name: Events
    description: Emit and query project-scoped events
  - name: Provider Models
    description: List available AI provider models
  - name: WhatsApp Flows
    description: Build interactive WhatsApp Flows for surveys and forms
  - name: Contacts
    description: Manage WhatsApp contacts
paths:
  /whatsapp/conversations:
    get:
      tags:
        - Conversations
      summary: List conversations
      description: >-
        Query WhatsApp conversations with filters. Results are returned by
        latest activity first and use cursor pagination.
      operationId: listWhatsappConversations
      parameters:
        - name: phone_number_id
          in: query
          description: Filter by WhatsApp phone number ID
          schema:
            type: string
        - name: phone_number
          in: query
          description: Filter by contact phone number (partial match)
          schema:
            type: string
        - name: status
          in: query
          description: Filter by conversation status
          schema:
            type: string
            enum:
              - active
              - ended
        - name: assigned_user_id
          in: query
          description: Filter by active assignee user ID (must be a project member)
          schema:
            type: string
            format: uuid
        - name: unassigned
          in: query
          description: >-
            Filter conversations with no active assignment. Cannot be combined
            with `assigned_user_id`.
          schema:
            type: boolean
        - name: created_after
          in: query
          description: Filter conversations created after this timestamp
          schema:
            type: string
            format: date-time
        - name: created_before
          in: query
          description: Filter conversations created before this timestamp
          schema:
            type: string
            format: date-time
        - name: last_active_after
          in: query
          description: Filter conversations active after this timestamp
          schema:
            type: string
            format: date-time
        - name: last_active_before
          in: query
          description: Filter conversations active before this timestamp
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          description: >-
            Maximum number of results per cursor-paginated page (default 20, max
            100).
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: before
          in: query
          description: Cursor for the previous page (Base64 encoded).
          schema:
            type: string
        - name: after
          in: query
          description: Cursor for the next page (Base64 encoded).
          schema:
            type: string
      responses:
        '200':
          description: List of conversations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsappConversationListResponse'
              examples:
                conversations:
                  value:
                    data:
                      - id: c63ced48-1283-4d55-8c8d-930f525aa0e5
                        phone_number: '14155550123'
                        status: active
                        last_active_at: '2025-07-16T09:45:00Z'
                        created_at: '2025-06-01T12:00:00Z'
                        updated_at: '2025-07-16T09:45:00Z'
                        metadata: {}
                        phone_number_id: '1234567890'
                        kapso:
                          contact_name: Alicia
                          messages_count: 42
                          last_message_id: wamid.HBgMMTIzNDU2
                          last_message_type: text
                          last_message_timestamp: '2025-07-16T09:40:00Z'
                          last_message_text: Thanks!
                          last_inbound_at: '2025-07-16T09:35:10Z'
                          last_outbound_at: '2025-07-16T09:40:00Z'
                    paging:
                      cursors:
                        before: >-
                          eyJ2YWx1ZXMiOlsiMjAyNi0wNS0xNVQxMzowNTowMC4wMDAwMDBaIiwiYzYzY2VkNDgtMTI4My00ZDU1LThjOGQtOTMwZjUyNWFhMGU1Il0sImNvbHVtbnMiOlsibGFzdF9hY3RpdmVfYXQiLCJpZCJdfQ==
                        after: >-
                          eyJ2YWx1ZXMiOlsiMjAyNi0wNS0xNVQxMjowNTowMC4wMDAwMDBaIiwiYzYzY2VkNDgtMTI4My00ZDU1LThjOGQtOTMwZjUyNWFhMGU1Il0sImNvbHVtbnMiOlsibGFzdF9hY3RpdmVfYXQiLCJpZCJdfQ==
                      next: null
                      previous: null
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    WhatsappConversationListResponse:
      type: object
      required:
        - data
        - paging
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WhatsappConversation'
        paging:
          $ref: '#/components/schemas/Paging'
    WhatsappConversation:
      type: object
      required:
        - id
        - status
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        phone_number:
          type:
            - string
            - 'null'
          description: Contact's WhatsApp number. Can be null for BSUID-only identity.
        business_scoped_user_id:
          type:
            - string
            - 'null'
          description: WhatsApp business-scoped user ID
        parent_business_scoped_user_id:
          type:
            - string
            - 'null'
          description: Parent business-scoped user ID when provided by Meta
        username:
          type:
            - string
            - 'null'
          description: WhatsApp username when available
        status:
          type: string
          enum:
            - active
            - ended
        last_active_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        metadata:
          type: object
          default: {}
          additionalProperties: true
        phone_number_id:
          type:
            - string
            - 'null'
        kapso:
          type:
            - object
            - 'null'
          description: Conversation metadata
          properties:
            contact_name:
              type:
                - string
                - 'null'
            messages_count:
              type: integer
              minimum: 0
            last_message_id:
              type:
                - string
                - 'null'
            last_message_type:
              type:
                - string
                - 'null'
            last_message_timestamp:
              type: string
              format: date-time
            last_message_text:
              type:
                - string
                - 'null'
            last_inbound_at:
              type: string
              format: date-time
            last_outbound_at:
              type: string
              format: date-time
    Paging:
      type: object
      properties:
        cursors:
          $ref: '#/components/schemas/PaginationCursor'
        next:
          type: string
          nullable: true
        previous:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    PaginationCursor:
      type: object
      properties:
        before:
          type: string
          description: Cursor for previous page (Base64 encoded)
        after:
          type: string
          description: Cursor for next page (Base64 encoded)
  responses:
    UnauthorizedError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````