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

# Call Logs

> Retrieves the call logs.



## OpenAPI

````yaml GET /api/v1/call-logs
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.callx.io
security:
  - bearerAuth: []
paths:
  /api/v1/call-logs:
    get:
      description: Retrieves a list of call logs.
      operationId: getCallLogs
      parameters:
        - name: startDate
          in: query
          required: false
          description: The start date for filtering results (YYYY-MM-DD format)
          schema:
            type: string
            format: date
          example: '2025-05-26'
        - name: endDate
          in: query
          required: false
          description: The end date for filtering results (YYYY-MM-DD format)
          schema:
            type: string
            format: date
          example: '2025-05-31'
        - name: page
          in: query
          required: false
          description: Page number for pagination
          schema:
            type: integer
            minimum: 1
            default: 1
          example: 5
        - name: pageSize
          in: query
          required: false
          description: Number of items per page
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          example: 10
        - name: search
          in: query
          required: false
          description: Search query to filter results
          schema:
            type: string
          example: customer inquiry
        - name: type
          in: query
          required: false
          description: Type of interaction to filter by
          schema:
            type: string
            enum:
              - inbound
              - outbound
          example: inbound
        - name: assistant
          in: query
          required: false
          description: Assistant ID to filter results by specific assistant
          schema:
            type: string
          example: 673bb5b4ce3a3f78867da8c2
        - name: endedReason
          in: query
          required: false
          description: Reason for how the interaction ended
          schema:
            type: string
            enum:
              - call-in-progress
              - user-hung-up
              - silence-timed-out
              - error
              - exceeded-max-duration
              - assistant-ended-call
              - assistant-low-balance
              - assistant-not-found
              - assistant-forwarded-error
              - no-answer
              - busy
              - failed
          example: completed
      responses:
        '200':
          description: Call logs retrieved successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CallLog'
            text/plain:
              schema:
                type: string
                description: Plain text representation of the call logs.
        '400':
          description: Bad request or validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Call logs not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CallLog:
      type: object
      required:
        - callSid
        - assistantId
        - userId
        - streamSid
        - accountSid
        - caller
        - phoneNumber
        - startTime
        - endTime
      properties:
        callSid:
          type: string
          description: Unique identifier for the call session
        assistantId:
          type: string
          description: MongoDB ObjectId reference to the assistant
        userId:
          type: string
          description: Identifier for the user associated with the call
        streamSid:
          type: string
          description: Identifier for the call stream
        accountSid:
          type: string
          description: Account identifier associated with the call
        callerCountry:
          type: string
          description: Country code of the caller
        caller:
          type: string
          description: Phone number or identifier of the caller
        costInCents:
          type: number
          description: Total cost of the call in cents
        endedReason:
          type: string
          description: Reason why the call ended
        hangupReason:
          type: string
          description: Specific reason for call hangup
        phoneNumber:
          type: string
          description: Phone number used for the call
        startTime:
          type: string
          format: date-time
          description: Timestamp when the call started
        endTime:
          type: string
          format: date-time
          description: Timestamp when the call ended
        duration:
          type: number
          description: Duration of the call in seconds
        messages:
          type: array
          items:
            type: object
            description: Array of messages exchanged during the call
        tokenUsage:
          type: array
          items:
            type: object
            description: Array of token usage records
        callType:
          type: string
          description: Type or category of the call
        summary:
          type: string
          description: Summary or notes about the call
        customeAssistant:
          type: object
          description: Custom assistant configuration or details
        callTime:
          type: string
          description: Formatted or processed call time information
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````