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

# List WhatsApp calls

> Returns a list of WhatsApp calls with optional filtering



## OpenAPI

````yaml api/legacy/openapi-whatsapp.yaml get /whatsapp_calls
openapi: 3.0.3
info:
  title: Kapso External API - WhatsApp API
  description: >-
    API for programmatically interacting with Kapso agents, executions, and
    WhatsApp conversations. This specification includes only WhatsApp API
    endpoints.
  version: 1.0.0
  contact:
    name: Kapso Support
servers:
  - url: https://app.kapso.ai/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /whatsapp_calls:
    get:
      tags:
        - WhatsApp Calls
      summary: List WhatsApp calls
      description: Returns a list of WhatsApp calls with optional filtering
      operationId: listWhatsappCalls
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: per_page
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: status
          in: query
          description: Filter by call status
          schema:
            type: string
        - name: direction
          in: query
          description: Filter by call direction
          schema:
            type: string
            enum:
              - inbound
              - outbound
        - name: voice_agent_id
          in: query
          description: Filter by voice agent ID
          schema:
            type: string
            format: uuid
        - name: whatsapp_config_id
          in: query
          description: Filter by WhatsApp configuration ID
          schema:
            type: string
            format: uuid
        - name: period
          in: query
          description: Filter by time period
          schema:
            type: string
            enum:
              - today
              - week
              - month
              - custom
        - name: start_date
          in: query
          description: Start date for custom period (ISO 8601 format)
          schema:
            type: string
            format: date-time
        - name: end_date
          in: query
          description: End date for custom period (ISO 8601 format)
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: A list of WhatsApp calls
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WhatsappCall'
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WhatsappCall:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: call-123abc
        project_id:
          type: string
          format: uuid
          example: project-456def
        whatsapp_config_id:
          type: string
          format: uuid
          example: config-789ghi
        config_display_name:
          type: string
          example: Customer Support Line
          description: Display name of the WhatsApp configuration
        config_display_phone_number:
          type: string
          example: '+1234567890'
          description: Display phone number of the WhatsApp configuration
        voice_agent_id:
          type: string
          format: uuid
          nullable: true
          example: agent-101jkl
        voice_agent_name:
          type: string
          nullable: true
          example: Support Agent
          description: Name of the voice agent handling the call
        call_id:
          type: string
          example: wa-call-xyz123
          description: WhatsApp call identifier
        direction:
          type: string
          enum:
            - inbound
            - outbound
          example: inbound
          description: Call direction
        status:
          type: string
          example: completed
          description: Current status of the call
        duration_seconds:
          type: integer
          nullable: true
          example: 180
          description: Duration of the call in seconds
        started_at:
          type: string
          format: date-time
          nullable: true
          description: When the call started
        ended_at:
          type: string
          format: date-time
          nullable: true
          description: When the call ended
        session_started_at:
          type: string
          format: date-time
          nullable: true
          description: When the session started
        user_wa_id:
          type: string
          example: '1234567890'
          description: WhatsApp ID of the user
        whatsapp_contact_id:
          type: string
          format: uuid
          nullable: true
          example: contact-202mno
        whatsapp_conversation_id:
          type: string
          format: uuid
          nullable: true
          example: conversation-303pqr
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PaginationMeta:
      type: object
      properties:
        page:
          type: integer
          example: 1
        per_page:
          type: integer
          example: 20
        total_pages:
          type: integer
          example: 5
        total_count:
          type: integer
          example: 100
    Error:
      type: object
      properties:
        error:
          type: string
          example: Resource not found
        status:
          type: integer
          example: 404
        message:
          type: string
          example: The requested resource could not be found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key required for all endpoints

````