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

# Query conversation logs

> Returns authorized conversation logs for a time range. Select returned fields, export CSV, or filter any log field with query names such as duration__gte, eventType__in, or metadata.status__icontains. Supported suffixes are eq, ne, gt, gte, lt, lte, in, nin, contains, icontains, startswith, istartswith, endswith, iendswith, regex, iregex, isnull, isset, empty, notempty, and present. Without a suffix, a field uses exact matching.



## OpenAPI

````yaml get /api/v2/logs
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
tags:
  - name: Agents
  - name: Inbound Email
    description: Control which senders may create inbound email work for an Agent.
  - name: Features
    description: Inspect capabilities available within an account hierarchy.
  - name: Conversation Logs
    description: Query conversation activity and calculate account-level metrics.
  - name: Computer Agents
    description: Set up, configure, inspect, and manage Vida Computer Agents.
  - name: Computer Agent Sessions
    description: View and reset Computer Agent sessions.
  - name: Accounts
  - name: Agent Templates
    description: Create, manage, and apply reusable Agent configurations.
paths:
  /api/v2/logs:
    get:
      tags:
        - Conversation Logs
      summary: Query conversation logs
      description: >-
        Returns authorized conversation logs for a time range. Select returned
        fields, export CSV, or filter any log field with query names such as
        duration__gte, eventType__in, or metadata.status__icontains. Supported
        suffixes are eq, ne, gt, gte, lt, lte, in, nin, contains, icontains,
        startswith, istartswith, endswith, iendswith, regex, iregex, isnull,
        isset, empty, notempty, and present. Without a suffix, a field uses
        exact matching.
      parameters:
        - name: start
          in: query
          required: false
          description: >-
            Start time as Unix seconds. Defaults to Unix epoch (Jan 1 1970
            00:00:00 UTC).
          example: 1727481600
          schema:
            type: integer
        - name: end
          in: query
          required: false
          description: End time as Unix seconds. Defaults to current time.
          example: 1728086400
          schema:
            type: integer
        - name: fields
          in: query
          required: false
          description: >-
            Comma separated list of fields to include. Restricted fields are
            always removed.
          example: id,timestamp,account_id,org_id,eventType
          schema:
            type: string
        - name: format
          in: query
          required: false
          description: >-
            Response format. json returns a JSON envelope. csv streams a CSV
            file.
          schema:
            type: string
            enum:
              - json
              - csv
            default: json
        - name: pageSize
          in: query
          required: false
          description: Page size for pagination. Max 10000. Defaults to 20.
          example: 500
          schema:
            type: integer
            minimum: 1
            maximum: 10000
        - name: page
          in: query
          required: false
          description: Page number starting at 1. Defaults to 1.
          example: 1
          schema:
            type: integer
            minimum: 1
        - name: includeFields
          in: query
          required: false
          description: When truthy, include an inferred schema array in the JSON response.
          example: true
          schema:
            type: boolean
        - name: targetAccountId
          in: query
          required: false
          description: >-
            Selected account whose conversation logs should be returned. Include
            this when the API token can access more than one account.
          example: 3026480
          schema:
            type: integer
        - name: outcome
          in: query
          required: false
          description: >-
            Match fields against one task-goal evaluation in the log outcomes
            array. Supply a URL-encoded JSON object followed by ||json.
          example: >-
            %7B%22type%22%3A%22task_goal%22%2C%22status%22%3A%22evaluated%22%2C%22value%22%3Atrue%7D%7C%7Cjson
          schema:
            type: string
        - name: field__suffix
          in: query
          required: false
          description: >-
            Replace field with a log field name and suffix with a supported
            comparison. Values may use an explicit ||json, ||bool, ||number,
            ||null, or ||string type hint. Repeat this pattern for each filter.
          example: 120||number
          schema:
            type: string
      responses:
        '200':
          description: >-
            Successful JSON response. When format=csv, a CSV file is streamed
            with status 200.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Success
                  logs:
                    type: array
                    description: >-
                      Array of log entries with restricted fields removed based
                      on caller scope.
                    items:
                      type: object
                      additionalProperties: true
                      example:
                        id: log_001
                        timestamp: '2025-09-30T12:34:56.789Z'
                        account_id: acct_123
                        org_id: org_456
                        eventType: message.created
                        metadata:
                          convoId: c_abc
                          tokens: 1234
                        outcomes:
                          - type: task_goal
                            status: evaluated
                            value: true
                            source: task_goal_evaluator
                            schemaVersion: 1
                  count:
                    type: integer
                    example: 20
                  totalCount:
                    type: integer
                    example: 5231
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        example: 1
                      pageSize:
                        type: integer
                        example: 20
                      totalPages:
                        type: integer
                        example: 262
                      totalCount:
                        type: integer
                        example: 5231
                      hasMore:
                        type: boolean
                        example: true
                      pageCount:
                        type: integer
                        example: 262
                  schema:
                    type: array
                    description: >-
                      Returned only when includeFields is truthy. The inferred
                      list of available fields.
                    items:
                      type: string
                    example:
                      - id
                      - timestamp
                      - account_id
                      - org_id
                      - eventType
                      - metadata
            text/csv:
              schema:
                type: string
                format: binary
                description: CSV export of logs when format=csv
        '401':
          description: Unauthorized. req.user missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Unauthorized Request
        '404':
          description: No logs available for CSV export when format=csv
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: No logs found for CSV export
        '500':
          description: Unhandled server error while fetching logs or generating CSV
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: An error occurred while fetching conversation logs.
                  error:
                    type: string
                    example: Detailed error message
        '503':
          description: Conversation logs service not available
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Conversation logs service not available
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````