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

# Get conversation history

> Read one oldest-first page of stored messages and recorded events, including internal notes, using the same implementation and opaque cursor as get_conversation_history. The default page size is 100 and maximum is 200. Existing History redaction and size limits remain. Missing or empty history returns 200 with items [] and nextCursor null; there is no extra existence query. Only the requested page is read. Requires cxm:conversations.read or an existing broader read/wildcard scope. A write-only scope does not grant read permission. GET accepts no request body. Unknown, repeated, array, and empty query parameters are rejected. Responses are marked no-store.



## OpenAPI

````yaml /api-reference/openapi-v1.json get /api/v1/cxm/tenants/{tenantId}/conversations/{conversationId}/history
openapi: 3.1.0
info:
  title: Crescendo CXP API
  version: 1.0.0
  description: >-
    Use the Customer Experience Platform API from trusted server-side
    applications to create Conversations, read projected detail and stored
    history, update operational fields, assign work, and add internal notes.
    Writes execute independently; repeating a write may repeat its effects.
servers:
  - url: https://platform.crescendo.ai
    description: Production
security: []
tags:
  - name: Conversations
    description: Create, continue, and manage customer conversations.
paths:
  /api/v1/cxm/tenants/{tenantId}/conversations/{conversationId}/history:
    get:
      tags:
        - Conversations
      summary: Get conversation history
      description: >-
        Read one oldest-first page of stored messages and recorded events,
        including internal notes, using the same implementation and opaque
        cursor as get_conversation_history. The default page size is 100 and
        maximum is 200. Existing History redaction and size limits remain.
        Missing or empty history returns 200 with items [] and nextCursor null;
        there is no extra existence query. Only the requested page is read.
        Requires cxm:conversations.read or an existing broader read/wildcard
        scope. A write-only scope does not grant read permission. GET accepts no
        request body. Unknown, repeated, array, and empty query parameters are
        rejected. Responses are marked no-store.
      operationId: getConversationHistory
      parameters:
        - name: tenantId
          in: path
          required: true
          description: Exact tenant-authorized ID without path separators.
          schema:
            type: string
            maxLength: 128
            minLength: 1
          example: tenant_demo
        - name: conversationId
          in: path
          required: true
          description: Exact tenant-authorized ID without path separators.
          schema:
            type: string
            maxLength: 512
            minLength: 1
          example: CX123
        - name: limit
          in: query
          required: false
          description: >-
            Maximum records in this page. Smaller pages can occur because of
            History byte limits.
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 100
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque nextCursor from a previous page for this tenant and
            Conversation.
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: Conversation read completed.
          headers:
            Cache-Control:
              schema:
                type: string
                const: no-store
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationHistoryResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
          description: >-
            Invalid target, unsupported or repeated query parameter, invalid
            limit/cursor, or a request body on GET.
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/PermissionDenied'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      security:
        - BearerApiKey: []
components:
  schemas:
    ConversationHistoryResponse:
      type: object
      additionalProperties: false
      required:
        - items
        - nextCursor
      properties:
        items:
          type: array
          maxItems: 200
          description: >-
            Oldest-first stored messages and events, including internal notes.
            Existing History redaction and size limits apply; records expose
            redactedPaths, truncatedFields, and sourceByteSizes.
          items:
            type: object
            additionalProperties: false
            required:
              - type
              - record
            properties:
              type:
                type: string
                enum:
                  - message
                  - event
              record:
                type: object
                additionalProperties: true
                description: >-
                  The native stored History record. Messages include messageId,
                  createdAt, visibility, author fields, role, body, and data.
                  Events include eventId, occurredAt, createdAt, kind, title,
                  detail, and data.
        nextCursor:
          type:
            - string
            - 'null'
          description: >-
            Opaque continuation cursor; pass it unchanged as cursor on the next
            request. Null means no further page was found.
    Error:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - BadRequest
            - InvalidCustomField
            - Unauthenticated
            - PermissionDenied
            - EmailChannelNotFound
            - AssigneeNotFound
            - NotFound
            - EmailChannelDisabled
            - ContactIdentityConflict
            - OrganizationAmbiguous
            - AssigneeAmbiguous
            - Conflict
            - PayloadTooLarge
            - RateLimitExceeded
            - BadGateway
            - ServiceUnavailable
            - GatewayTimeout
        message:
          type: string
  responses:
    BadRequest:
      description: The body, a field, an unknown property, or a custom field is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: BadRequest
            message: message.text is required
    Unauthenticated:
      description: The API key is missing, invalid, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: Unauthenticated
            message: Authentication required
    PermissionDenied:
      description: The API key does not authorize the tenant or required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: PermissionDenied
            message: API key does not allow this operation
    RateLimitExceeded:
      description: The tenant/API-key/route limit was exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before another request.
          schema:
            type: integer
            minimum: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: RateLimitExceeded
            message: CXM API rate limit exceeded
    BadGateway:
      description: >-
        The gateway could not complete downstream transport. The durable
        mutation outcome may be unknown.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: BadGateway
            message: CXM API downstream request failed
    ServiceUnavailable:
      description: A required service or durable/configuration dependency is unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: ServiceUnavailable
            message: CXM API is temporarily unavailable
    GatewayTimeout:
      description: >-
        The gateway timed out. The durable mutation outcome may be unknown, and
        retrying can duplicate effects.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: GatewayTimeout
            message: CXM API downstream request timed out
  securitySchemes:
    BearerApiKey:
      type: http
      scheme: bearer
      description: >-
        Tenant API key with `cxm:conversations.write`, `cxm:conversations.*`,
        `cxm:write`, or `cxm:*` scope. Keep it in a trusted backend; do not
        expose it in browser code.

````