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

# Get session transcript

[Back to the Analytics APIs overview](https://koreai.mintlify.site/agent-platform/api-reference/analytics-overview.md)

Use this endpoint to read the transcript of one saved session. The response contains the customer-visible messages in conversation order, one page at a time. Content that the PII policy scrubbed stays scrubbed. The API writes an audit log entry for every call.

Set `includeSummary` to `true` to add a summary of the session to the first page. To summarize a session or a transcript that you send, use [Generate conversation summary](https://koreai.mintlify.site/agent-platform/api-reference/analytics-generate-conversation-summary).

## Prerequisites

* A Platform Key bound to the project, sent in the `x-api-key` header, with the `session:read` permission.
* The ID of a session in the project.
* For `includeSummary`, a model bound to the `conversation_summary` feature in the project. Without it, the response is still `200`, and `summary.error` has the code `SUMMARY_MODEL_NOT_CONFIGURED`.

## Request

Send the session ID in the path. The path takes one ID. A comma-separated list returns `400 SINGLE_SESSION_ONLY`.

| Parameter | Description |
| :- | :- |
| `cursor` | The `nextCursor` value from the previous page. Omit it for the first page. |
| `limit` | The number of messages per page, from 1 to 200. The default is 50. The API caps values above 200 at 200. |
| `includeSummary` | `true` adds `data.summary` to the first page. The default is `false`. Any other value returns `400 INVALID_QUERY_PARAMETER`. |

To get the next page, pass `nextCursor` from the response as `cursor`. Check `hasMore` to know whether more pages exist. A cursor error returns `400`. When the error has `resetRequired` set to `true`, restart from the first page.

To send the parameters in a request body instead of the URL, use [Get session transcript using JWE payload](https://koreai.mintlify.site/agent-platform/api-reference/analytics-get-session-transcript-with-encrypted-payload).

### Include a summary

With `includeSummary` set to `true`, the first page includes `data.summary`. The first page is the request without a `cursor`.

* The summary covers the whole saved session, not only the returned page.
* On later pages, the API accepts the flag and ignores it.
* With the flag off, which is the default, the API makes no model call and the response has no summary.
* The summary is the same one that [Generate conversation summary](https://koreai.mintlify.site/agent-platform/api-reference/analytics-generate-conversation-summary) returns for the session. It uses the same prompt, model, PII handling, limits, 30-second deadline, and LLM call record.
* A failed summary doesn't fail the request. The response is still `200`, with `summary.text` set to `null` and `summary.error` set.

## Response

| Field | Description |
| :- | :- |
| `success` | Always `true` on a successful response. |
| `data.sessionId` | The ID of the session. |
| `data.turns` | The messages on this page, in conversation order. |
| `data.nextCursor` | Pass this value as `cursor` to read the next page. `null` on the last page. |
| `data.hasMore` | `true` when more pages exist. |
| `data.ordering` | The ordering of the messages, with `mode` and `version`. |
| `data.summary` | Only when `includeSummary` is `true` and the request has no `cursor`. |

### Turn fields

Each item in `data.turns` has these fields:

| Field | Description |
| :- | :- |
| `messageId` | The ID of the message. |
| `role` | The sender of the message, such as `user` or `assistant`. |
| `timestamp` | The time of the message. |
| `content` | The content of the message, after the project's PII read policy. |

### Summary fields

The `data.summary` object has these fields:

| Field | Description |
| :- | :- |
| `text` | The summary, after the project's PII read policy. `null` when generation failed. |
| `messageCount` | The number of user and assistant messages in the session. |
| `summarizedMessageCount` | The number of messages sent to the model. `0` when no model call ran. |
| `truncated` | `true` when the oldest messages were left out to fit the input budget. |
| `requestId` | The ID that finds the model call in the LLM ledger. Use it with [List LLM calls](https://koreai.mintlify.site/agent-platform/api-reference/analytics-list-llm-calls). `null` when no model call ran. |
| `error` | Only on failure. The `code` is `NO_SUMMARIZABLE_MESSAGES`, `SUMMARY_MODEL_NOT_CONFIGURED`, `SUMMARY_MODEL_FAILED`, or `SUMMARY_TIMEOUT`. The `message` explains it. |

## Errors

An error response has `success` set to `false` and an `error` object with a `code` and a `message`.

| Status | Code | Cause |
| :- | :- | :- |
| `400` | `SINGLE_SESSION_ONLY` | The `sessionId` path value is a comma-separated list. |
| `400` | `INVALID_QUERY_PARAMETER` | A query parameter is invalid, such as an `includeSummary` value other than `true` or `false`. |
| `400` | Cursor errors | The `cursor` is invalid. When `resetRequired` is `true`, restart from the first page. |
| `401` | `AUTHENTICATION_REQUIRED` | The `x-api-key` header is missing or invalid. |
| `403` | `FORBIDDEN` | The key lacks `session:read` or isn't bound to the project. |
| `404` | `NOT_FOUND` | The session doesn't exist. The API also returns this error for a session in another project. |
| `429` | `RATE_LIMITED` | The tenant request rate limit is exceeded. |
| `500` | `TRANSCRIPT_FAILED` | The API couldn't read the transcript. |

***

**Related articles:**

* [Generate conversation summary](https://koreai.mintlify.site/agent-platform/api-reference/analytics-generate-conversation-summary): Summarize a saved session or a transcript that you send.
* [List conversation messages](https://koreai.mintlify.site/agent-platform/api-reference/analytics-list-conversation-messages): List the messages of many sessions with filters.


## OpenAPI

````yaml agent-platform/api-specs/analytics-session-transcript.yaml get /api/public/analytics/projects/{projectId}/sessions/{sessionId}/transcript
openapi: 3.1.0
info:
  title: Artemis Analytics Session Transcript API
  version: 1.1.0
  summary: >-
    Read the transcript of one session, optionally with its conversation
    summary.
  description: >
    Returns the customer-visible messages of one saved session in conversation

    order, one page at a time. PII-scrubbed content stays scrubbed. Every call
    is

    audit-logged.


    `includeSummary` adds `data.summary` to the first page (no `cursor`). 

    The summary is the same one `/conversation-summary` returns for the
    session: 

    same prompt, model, PII handling, limits, 30-second deadline and
    `llm_metrics` row.

    It covers the whole saved session, not only the returned page. 

    On later pages the flag is accepted and ignored. With the flag off (the
    default) 

    the response is unchanged and no model call is made. A failed summary
    doesn't 

    fail the request: the response is still 200, with `summary.text` null and
    `summary.error` set.


    Authenticate with the `x-api-key` header. The key must be bound to the

    project and have `session:read`. The POST form takes the same parameters in

    a JSON body; request and response encryption follow the Platform Key

    settings.
servers:
  - url: https://agents.kore.ai
security:
  - PlatformKey: []
paths:
  /api/public/analytics/projects/{projectId}/sessions/{sessionId}/transcript:
    parameters:
      - $ref: '#/components/parameters/ProjectId'
      - $ref: '#/components/parameters/SessionId'
    get:
      tags:
        - Session Transcript
      summary: Get a session transcript
      operationId: getPublicAnalyticsSessionTranscript
      parameters:
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque cursor from `nextCursor` of the previous page. Omit for the
            first page.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Messages per page. Values above 200 are capped at 200.
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
        - name: includeSummary
          in: query
          required: false
          description: |
            `true` adds `data.summary` on the first page. Only `true` or `false`
            is accepted; any other value returns 400 INVALID_QUERY_PARAMETER.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
      responses:
        '200':
          description: One page of the transcript.
          headers:
            Cache-Control:
              schema:
                type: string
                example: private, no-store, max-age=0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranscriptResponse'
              examples:
                withSummary:
                  $ref: '#/components/examples/TranscriptWithSummary'
                summaryFailed:
                  $ref: '#/components/examples/TranscriptSummaryFailed'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/Error'
components:
  parameters:
    ProjectId:
      name: projectId
      in: path
      required: true
      schema:
        type: string
        minLength: 1
    SessionId:
      name: sessionId
      in: path
      required: true
      description: One session id. A comma-separated list returns 400 SINGLE_SESSION_ONLY.
      schema:
        type: string
        minLength: 1
  schemas:
    TranscriptResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          const: true
        data:
          type: object
          required:
            - sessionId
            - turns
            - nextCursor
            - hasMore
            - ordering
          properties:
            sessionId:
              type: string
            turns:
              type: array
              items:
                $ref: '#/components/schemas/TranscriptTurn'
            nextCursor:
              type:
                - string
                - 'null'
              description: Pass as `cursor` to read the next page. Null on the last page.
            hasMore:
              type: boolean
            ordering:
              type: object
              properties:
                mode:
                  type: string
                  example: durable
                version:
                  type: integer
                  example: 2
            summary:
              $ref: '#/components/schemas/TranscriptSummary'
    TranscriptTurn:
      type: object
      required:
        - messageId
        - role
        - timestamp
        - content
      properties:
        messageId:
          type: string
        role:
          type: string
          example: user
          description: For example user or assistant.
        timestamp:
          type: string
          format: date-time
        content:
          description: Message content after the PII read policy.
    TranscriptSummary:
      type: object
      description: >-
        Present only when `includeSummary` is true and the request has no
        `cursor`.
      required:
        - text
        - messageCount
        - summarizedMessageCount
        - truncated
        - requestId
      properties:
        text:
          type:
            - string
            - 'null'
          description: Summary after the PII read policy. Null when generation failed.
        messageCount:
          type: integer
          description: User and assistant messages in the session.
        summarizedMessageCount:
          type: integer
          description: Messages sent to the model. 0 when no model call was made.
        truncated:
          type: boolean
          description: True when the oldest messages were left out to fit the input budget.
        requestId:
          type:
            - string
            - 'null'
          description: Finds the model call in the LLM ledger. Null when no model call ran.
        error:
          type: object
          description: Present only on failure. The transcript response is still 200.
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - NO_SUMMARIZABLE_MESSAGES
                - SUMMARY_MODEL_NOT_CONFIGURED
                - SUMMARY_MODEL_FAILED
                - SUMMARY_TIMEOUT
            message:
              type: string
    ErrorEnvelope:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            resetRequired:
              type: boolean
  examples:
    TranscriptWithSummary:
      value:
        success: true
        data:
          sessionId: c6c7dfd6-3988-468b-89b2-86907d5acbba
          turns:
            - messageId: msg_01
              role: assistant
              timestamp: '2026-11-26T10:00:00.000Z'
              content: Welcome to Venus Bank! May I have your customer ID?
            - messageId: msg_02
              role: user
              timestamp: '2026-11-26T10:00:05.000Z'
              content: cust-001
          nextCursor: null
          hasMore: false
          ordering:
            mode: durable
            version: 2
          summary:
            text: The customer asked about their credit cards. ...
            messageCount: 13
            summarizedMessageCount: 13
            truncated: false
            requestId: sum_7f3c2a9e4b1d4c0a
    TranscriptSummaryFailed:
      value:
        success: true
        data:
          sessionId: c6c7dfd6-3988-468b-89b2-86907d5acbba
          turns: []
          nextCursor: null
          hasMore: false
          ordering:
            mode: durable
            version: 2
          summary:
            text: null
            messageCount: 0
            summarizedMessageCount: 0
            truncated: false
            requestId: null
            error:
              code: NO_SUMMARIZABLE_MESSAGES
              message: The conversation has no user or assistant messages
  responses:
    Error:
      description: |
        Error envelope. Codes: SINGLE_SESSION_ONLY, INVALID_QUERY_PARAMETER,
        INVALID_REQUEST_BODY, ENCRYPTED_PAYLOAD_INVALID, cursor errors (400,
        `resetRequired` tells the caller to restart from the first page);
        AUTHENTICATION_REQUIRED (401); FORBIDDEN (403); NOT_FOUND (404, also
        returned for a session in another project); UNSUPPORTED_MEDIA_TYPE
        (415); RATE_LIMITED (429); TRANSCRIPT_FAILED (500).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    PlatformKey:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.