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

# List Transcripts by Agent

> Retrieve a paginated list of session transcripts handled by a specific voice agent.

Retrieve a complete, paginated history of all conversations handled by a specific Voice Agent.

If you have built multiple agents (e.g., one for Customer Support and another for Sales), this endpoint makes it incredibly easy to isolate the call logs for just one of those entities. This is the perfect endpoint to power an "Agent Performance" or "Recent Calls" view in your application's dashboard.

<Info>
  **Authentication Required:** You must include your API key in the `x-api-key` header to authenticate this request.
</Info>

### Required Parameters

* **`agentId` (Path Parameter):** The 24-character unique identifier of the agent whose transcripts you want to view.

### Managing Large Datasets

Agents that handle high volumes of calls will quickly accumulate thousands of transcripts. Use the query parameters to control how much data you receive at once:

* **`limit`**: Defines how many session records to return in a single response (default is usually 10 or 20).
* **`offset`**: Allows you to skip a specific number of records. If your `limit` is 10, an `offset` of 10 will fetch page 2.
* **`sort`**: Choose `desc` to see the most recently completed calls first, or `asc` to view them in the order they occurred historically.

### Understanding the Response

A successful `200 OK` response returns a standard pagination object.

* **`items`**: An array containing the actual transcript objects. Each object includes the `chatHistory`, the `sessionReport` (if configured), and metadata like `durationMs` and `messageCount`.
* **`total`**: The absolute total number of transcripts this agent has recorded.
* **`nextOffset`**: A highly useful property that tells your frontend exactly what `offset` value to pass in your next API call to fetch the next page of results.


## OpenAPI

````yaml get /transcripts/agent/{agentId}
openapi: 3.0.3
info:
  title: Lyzr Voice LiveKit API
  version: 1.0.0
servers:
  - url: https://voice-livekit.studio.lyzr.ai/v1
security: []
paths:
  /transcripts/agent/{agentId}:
    get:
      summary: List Transcripts by Agent
      description: >-
        Retrieve a paginated list of session transcripts handled by a specific
        voice agent.
      parameters:
        - name: agentId
          in: path
          required: true
          description: The unique identifier of the agent.
          schema:
            type: string
            example: f790923795a23467555c0ad6
        - name: limit
          in: query
          description: The maximum number of transcripts to return per page.
          schema:
            type: integer
            example: 10
        - name: offset
          in: query
          description: The number of items to skip for pagination.
          schema:
            type: integer
            example: 0
        - name: sort
          in: query
          description: Sort order based on creation time.
          schema:
            type: string
            enum:
              - asc
              - desc
            example: desc
      responses:
        '200':
          description: >-
            Paginated transcripts for the specified agent retrieved
            successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        sessionId:
                          type: string
                          format: uuid
                        roomName:
                          type: string
                        agentId:
                          type: string
                        orgId:
                          type: string
                          format: uuid
                        createdByUserId:
                          type: string
                        sessionReport:
                          type: object
                          additionalProperties: true
                        chatHistory:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
                        closeReason:
                          type: string
                        durationMs:
                          type: integer
                        messageCount:
                          type: integer
                        startedAt:
                          type: string
                          format: date-time
                        endedAt:
                          type: string
                          format: date-time
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                  total:
                    type: integer
                    example: 42
                  limit:
                    type: integer
                    example: 10
                  offset:
                    type: integer
                    example: 0
                  nextOffset:
                    type: integer
                    example: 10
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````