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

# List all calls

> Retrieve a paginated list of calls for the company. Supports filtering by status, date range, and other criteria. Includes recording URLs when available.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/call/
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/call/:
    get:
      tags:
        - Calls
      summary: List all calls
      description: >-
        Retrieve a paginated list of calls for the company. Supports filtering
        by status, date range, and other criteria. Includes recording URLs when
        available.
      operationId: list_calls_v1_call__get
      parameters:
        - name: after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: After
        - name: before
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Before
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 50
            title: Limit
        - name: order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Order
        - name: agent_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Agent Id
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/CallStatus'
              - type: 'null'
            title: Status
        - name: type
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/CallType'
              - type: 'null'
            title: Type
        - name: start_created_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Start Created Date
        - name: end_created_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: End Created Date
        - name: contact_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Contact Id
        - name: phone_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Phone Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_CallResponse_'
        '400':
          description: Bad request - Invalid field
          content:
            application/json:
              example:
                status: error
                error_code: NOT_VALID_FIELD
                message: Invalid field value in query parameters
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              example:
                status: error
                error_code: INTERNAL_SERVER_ERROR
                message: Missing required permissions to view calls
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
        '422':
          description: Unprocessable entity - Invalid pagination
          content:
            application/json:
              example:
                status: error
                error_code: INVALID_PAGINATION_PARAMETERS
                message: Cannot specify both 'before' and 'after' parameters
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                status: error
                error_code: INTERNAL_SERVER_ERROR
                message: 'Error: Internal Server Error'
              schema:
                $ref: '#/components/schemas/ErrorResponseSchema'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    CallStatus:
      type: string
      enum:
        - dialing
        - in_progress
        - completed
        - failed
        - transferred
        - no_answer
      title: CallStatus
    CallType:
      type: string
      enum:
        - inbound
        - outbound
      title: CallType
    PaginatedResponse_CallResponse_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/CallResponse'
          type: array
          title: Data
        first_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: First Id
        last_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Last Id
        has_more:
          type: boolean
          title: Has More
        current_page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Current Page
        total_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Pages
      type: object
      required:
        - data
        - has_more
      title: PaginatedResponse[CallResponse]
    ErrorResponseSchema:
      properties:
        status:
          type: string
          title: Status
          description: Status of the response, always 'error' for error responses
          default: error
        error_code:
          type: string
          title: Error Code
          description: Machine-readable error code in SCREAMING_SNAKE_CASE format
          examples:
            - PROJECT_NOT_FOUND
            - INVALID_EMAIL
            - UNAUTHORIZED_ROLE
        message:
          type: string
          title: Message
          description: Human-readable error message with details
          examples:
            - Project with id 550e8400-e29b-41d4-a716-446655440000 not found
            - The email invalid@email is not valid
            - Insufficient permissions to perform this action
      type: object
      required:
        - error_code
        - message
      title: ErrorResponseSchema
      description: Standard error response format for all API errors.
    CallResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Call ID
          description: The unique identifier for the call
        agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agent ID
          description: The unique identifier for the agent that handled the call
        agent_version_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agent Version ID
          description: The unique identifier for the agent version that handled the call
        status:
          $ref: '#/components/schemas/CallStatus'
          title: Call Status
          description: The current status of the call
        recording_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Recording URL
          description: The call recording URL.
        start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Call Start Time
          description: The start time of the call
        end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Call End Time
          description: The end time of the call, if ended
        duration:
          anyOf:
            - type: integer
            - type: 'null'
          title: Call Duration
          description: The call duration in seconds. `null` if the call has not ended
        type:
          $ref: '#/components/schemas/CallType'
          title: Call Type
          description: The direction of the phone call
        end_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: End Reason
          description: The reason for call termination, if the call has ended
        contact:
          $ref: '#/components/schemas/ContactResponseSchema'
          title: Contact
          description: Details of the contact that initiated or received the call
        phone_register_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Phone ID
          description: The ID of the phone that was used to make or receive the call
        dynamic_variables:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Dynamic Variables
          description: A dictionary of dynamic variables that were used during the call
        created_date:
          type: string
          format: date-time
          title: Created Date
          description: The date and time when the call was created
      type: object
      required:
        - id
        - agent_id
        - agent_version_id
        - status
        - type
        - contact
        - phone_register_id
        - created_date
      title: CallResponse
    ContactResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Caller ID
          description: Unique identifier for the caller
        created_date:
          type: string
          format: date-time
          title: Created Date
          description: >-
            The date and time when the callerwas registered for the first time.
            Notice thatthe caller is created just the first time they call.
        identifier:
          type: string
          title: Identifier
          description: >-
            The identifier of the caller. This is the phone number of the caller
            if it's a phone call contact or the browser identifier if it's a web
            contact.
        contact_type:
          $ref: '#/components/schemas/Channel'
          title: Contact Type
          description: The type of contact.
      type: object
      required:
        - id
        - created_date
        - identifier
        - contact_type
      title: ContactResponseSchema
    Channel:
      type: string
      enum:
        - call
        - web
      title: Channel
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````