> ## 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.

# Get logs for a call

> Retrieve external logs for a specific call. Returns customer-visible logs only.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/log/call/{call_id}
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/log/call/{call_id}:
    get:
      tags:
        - Logs
      summary: Get logs for a call
      description: >-
        Retrieve external logs for a specific call. Returns customer-visible
        logs only.
      operationId: get_call_logs_v1_log_call__call_id__get
      parameters:
        - name: call_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The call ID to get logs for
            title: Call Id
          description: The call ID to get logs for
        - 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: 100
            title: Limit
        - name: order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            default: desc
            title: Order
        - name: category
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/LogCategory'
              - type: 'null'
            title: Category
        - name: level
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/LogLevel'
              - type: 'null'
            title: Level
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_CallLogResponse_'
        '404':
          description: Not found - Call does not exist
          content:
            application/json:
              example:
                status: error
                error_code: CALL_NOT_FOUND
                message: Call not found
              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:
    LogCategory:
      type: string
      enum:
        - CALL_LIFECYCLE
        - USER
        - AGENT
        - CALL_TOOLS
        - INTEGRATION_TOOLS
        - CONVERSATIONAL_PATHS
        - TRANSFER
        - METRICS
        - SECURITY
        - WEBHOOKS
        - WORKFLOWS
        - KNOWLEDGE
      title: LogCategory
      description: Log category codes for event classification.
    LogLevel:
      type: string
      enum:
        - DEBUG
        - INFO
        - WARNING
        - ERROR
        - CRITICAL
      title: LogLevel
      description: Log severity levels with numeric codes.
    PaginatedResponse_CallLogResponse_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/CallLogResponse'
          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[CallLogResponse]
    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.
    CallLogResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Log ID
          description: The unique identifier for the log entry.
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: When the log event occurred.
        level:
          type: string
          title: Log Level
          description: >-
            The severity level of the log (DEBUG, INFO, WARNING, ERROR,
            CRITICAL).
        category:
          type: string
          title: Category
          description: The category of the log event (e.g., CALL_LIFECYCLE, USER, AGENT).
        event:
          type: string
          title: Event
          description: The specific event that occurred.
        call_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Call ID
          description: The ID of the call associated with this log entry.
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Trace ID
          description: The OpenTelemetry trace ID for distributed tracing.
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Event Data
          description: Event-specific data including message_text, failure_reason, etc.
      type: object
      required:
        - id
        - timestamp
        - level
        - category
        - event
      title: CallLogResponse
      description: |-
        Response schema for call log entries.

        Note: message_text and error details (failure_reason) are stored
        in the `data` field, not as separate fields.
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````