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

# List session messages

> One page of a conversation, newest first — the app-web conversation view
and the WebChat session restore. Replaces core-api
`GET /tenants/:tenantID/sessions/:sessionID/messages`.

Operators read within their inbox scope. A plugin installed on the tenant
(`Plugin` token) or the tenant's plugin connection reads unrestricted, as
on core-api.

Page by passing the `createdAt` (epoch ms) of the last message as
`firstMessageTimestamp`; the boundary message comes back again, so dedupe
by id. A session that does not exist, or that the operator's inboxes do not
cover, answers an empty page (200), not an error. Returns 206 instead of
200 when more pages are available.



## OpenAPI

````yaml /api/services-api.yaml get /v1/tenants/{tenantID}/sessions/{sessionID}/messages
openapi: 3.0.3
info:
  description: >-
    Talqui is an omnichannel customer service platform that unifies
    conversations from WhatsApp, Instagram, Telegram, and many other channels
    into a single attendant panel, alongside a broader ecosystem of plugins and
    integrations. This API gives developers programmatic access to Talqui's
    services layer, exposing the operations needed to read and manage tenants,
    conversations, plugins, and related resources that power that platform.


    Authentication is available on behalf of an Operator (the default for this
    API), a Plugin Connection, or a Plugin — see the [Talqui authentication
    guide](https://docs.talqui.chat/guides/introduction/authentication/) for how
    each token is obtained and when to use it.


    Need help or have questions not covered here? Reach out to
    support@talqui.com.
  license:
    name: ISC
    url: https://opensource.org/license/isc-license-txt
  title: Talqui - Services API
  version: 0.78.1
servers:
  - description: Production
    url: https://services-api.talqui.chat
security: []
tags:
  - name: Tenants
  - name: Settings
  - name: Analytics/Reports
  - name: Analytics
  - name: Campaigns
  - name: Campaigns/Models
  - name: Contacts
  - name: Contacts/Imports
  - name: Handoff links
  - name: Inboxes
  - name: Messages
  - name: Notifications
  - name: Sessions
  - name: Operators/Shortcuts
  - name: Operators
  - name: Plugins
  - name: Setup
  - name: Uploads
paths:
  /v1/tenants/{tenantID}/sessions/{sessionID}/messages:
    get:
      tags:
        - Sessions
      summary: List session messages
      description: >-
        One page of a conversation, newest first — the app-web conversation view

        and the WebChat session restore. Replaces core-api

        `GET /tenants/:tenantID/sessions/:sessionID/messages`.


        Operators read within their inbox scope. A plugin installed on the
        tenant

        (`Plugin` token) or the tenant's plugin connection reads unrestricted,
        as

        on core-api.


        Page by passing the `createdAt` (epoch ms) of the last message as

        `firstMessageTimestamp`; the boundary message comes back again, so
        dedupe

        by id. A session that does not exist, or that the operator's inboxes do
        not

        cover, answers an empty page (200), not an error. Returns 206 instead of

        200 when more pages are available.
      operationId: ListSessionMessagesController
      parameters:
        - in: path
          name: tenantID
          required: true
          schema:
            description: The tenant of the conversation.
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            type: string
        - in: path
          name: sessionID
          required: true
          schema:
            description: The session being read.
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            type: string
        - in: query
          name: perPage
          required: false
          schema:
            default: 50
            description: Messages per page (max 200).
            maximum: 200
            minimum: 1
            type: integer
        - in: query
          name: firstMessageTimestamp
          required: false
          schema:
            description: >-
              Page cursor, epoch ms: messages created at or before it. Defaults
              to now.
            exclusiveMinimum: true
            maximum: 9007199254740991
            type: integer
        - in: query
          name: infiniteScroll
          required: false
          schema:
            default: 'false'
            description: >-
              `true` reads the contact thread across sessions (minus overlapping
              ones) instead of this session alone.
            enum:
              - 'true'
              - 'false'
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    description: Messages, newest first.
                    items:
                      additionalProperties: {}
                      properties:
                        contact:
                          additionalProperties: false
                          description: The contact, photo resolved.
                          nullable: true
                          properties:
                            contactFirstname:
                              type: string
                            contactID:
                              type: string
                            contactLastname:
                              type: string
                            contactPhone:
                              type: string
                            contactPhoto:
                              nullable: true
                              type: string
                          required:
                            - contactID
                            - contactFirstname
                            - contactLastname
                            - contactPhone
                            - contactPhoto
                          type: object
                        contactID:
                          description: The contact of the conversation.
                          type: string
                        createdAt:
                          description: When this message was created.
                          format: date-time
                          type: string
                        messageID:
                          description: Unique identifier for this message.
                          type: string
                        messageKey:
                          description: The message content type.
                          type: string
                        messageValue:
                          description: >-
                            Message content — the text, or an object for
                            attachments (address resolved).
                        operator:
                          additionalProperties: false
                          description: >-
                            The operator who sent it, photo resolved; null for
                            contact/bot messages.
                          nullable: true
                          properties:
                            operatorFirstname:
                              type: string
                            operatorID:
                              type: string
                            operatorLastname:
                              type: string
                            operatorPhoto:
                              nullable: true
                              type: string
                          required:
                            - operatorID
                            - operatorFirstname
                            - operatorLastname
                            - operatorPhoto
                          type: object
                        sessionID:
                          description: The session this message belongs to.
                          type: string
                      required:
                        - messageID
                        - sessionID
                        - contactID
                        - messageKey
                        - messageValue
                        - createdAt
                        - contact
                        - operator
                      type: object
                    type: array
                  meta:
                    additionalProperties: false
                    description: Pagination metadata.
                    properties:
                      count:
                        description: Number of messages in this page.
                        type: number
                      hasMore:
                        description: >-
                          Whether older messages remain — page again with the
                          last `createdAt`.
                        type: boolean
                    required:
                      - hasMore
                      - count
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Response for status 200.
        '206':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    description: Messages, newest first.
                    items:
                      additionalProperties: {}
                      properties:
                        contact:
                          additionalProperties: false
                          description: The contact, photo resolved.
                          nullable: true
                          properties:
                            contactFirstname:
                              type: string
                            contactID:
                              type: string
                            contactLastname:
                              type: string
                            contactPhone:
                              type: string
                            contactPhoto:
                              nullable: true
                              type: string
                          required:
                            - contactID
                            - contactFirstname
                            - contactLastname
                            - contactPhone
                            - contactPhoto
                          type: object
                        contactID:
                          description: The contact of the conversation.
                          type: string
                        createdAt:
                          description: When this message was created.
                          format: date-time
                          type: string
                        messageID:
                          description: Unique identifier for this message.
                          type: string
                        messageKey:
                          description: The message content type.
                          type: string
                        messageValue:
                          description: >-
                            Message content — the text, or an object for
                            attachments (address resolved).
                        operator:
                          additionalProperties: false
                          description: >-
                            The operator who sent it, photo resolved; null for
                            contact/bot messages.
                          nullable: true
                          properties:
                            operatorFirstname:
                              type: string
                            operatorID:
                              type: string
                            operatorLastname:
                              type: string
                            operatorPhoto:
                              nullable: true
                              type: string
                          required:
                            - operatorID
                            - operatorFirstname
                            - operatorLastname
                            - operatorPhoto
                          type: object
                        sessionID:
                          description: The session this message belongs to.
                          type: string
                      required:
                        - messageID
                        - sessionID
                        - contactID
                        - messageKey
                        - messageValue
                        - createdAt
                        - contact
                        - operator
                      type: object
                    type: array
                  meta:
                    additionalProperties: false
                    description: Pagination metadata.
                    properties:
                      count:
                        description: Number of messages in this page.
                        type: number
                      hasMore:
                        description: >-
                          Whether older messages remain — page again with the
                          last `createdAt`.
                        type: boolean
                    required:
                      - hasMore
                      - count
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Response for status 206.
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/MissingTenantIDError'
                        - $ref: '#/components/schemas/MissingOperatorIDError'
                        - $ref: '#/components/schemas/RequestValidationError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            MissingTenantIDError (error_code 1001): tenantID absent from the
            URL. | MissingOperatorIDError (error_code 1063): an operator
            identity carries no operatorID. | RequestValidationError (error_code
            1002): params or query fail schema validation.
        '401':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/UnauthorizedError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: 'UnauthorizedError (error_code 1003): missing/invalid token.'
        '403':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/ForbiddenError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            ForbiddenError (error_code 1004): the caller does not work in this
            tenant, or the plugin is not installed on it.
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/TenantNotFoundError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            TenantNotFoundError (error_code 1062): tenantID does not resolve to
            a tenant.
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/UnknownError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            UnknownError (error_code 5999): Unexpected internal error not
            otherwise documented for this endpoint.
components:
  schemas:
    MissingTenantIDError:
      additionalProperties: false
      properties:
        error:
          enum:
            - MissingTenantIDError
          type: string
        error_code:
          enum:
            - 1001
          type: number
        message:
          example: tenantID is required.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    MissingOperatorIDError:
      additionalProperties: false
      properties:
        error:
          enum:
            - MissingOperatorIDError
          type: string
        error_code:
          enum:
            - 1063
          type: number
        message:
          example: operatorID is required.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    RequestValidationError:
      additionalProperties: false
      properties:
        error:
          enum:
            - RequestValidationError
          type: string
        error_code:
          enum:
            - 1002
          type: number
        fields:
          items:
            additionalProperties: false
            properties:
              allowed:
                type: string
              field:
                type: string
              received:
                type: string
            required:
              - field
              - received
              - allowed
            type: object
          type: array
        message:
          example: Invalid request data.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
        - fields
      type: object
    UnauthorizedError:
      additionalProperties: false
      properties:
        error:
          enum:
            - UnauthorizedError
          type: string
        error_code:
          enum:
            - 1003
          type: number
        message:
          example: You are not authorized to perform this request.
          type: string
        statusCode:
          enum:
            - 401
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    ForbiddenError:
      additionalProperties: false
      properties:
        error:
          enum:
            - ForbiddenError
          type: string
        error_code:
          enum:
            - 1004
          type: number
        message:
          example: You do not have access to this resource.
          type: string
        statusCode:
          enum:
            - 403
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    TenantNotFoundError:
      additionalProperties: false
      properties:
        error:
          enum:
            - TenantNotFoundError
          type: string
        error_code:
          enum:
            - 1062
          type: number
        message:
          example: Tenant not found.
          type: string
        statusCode:
          enum:
            - 404
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    UnknownError:
      additionalProperties: false
      properties:
        error:
          enum:
            - UnknownError
          type: string
        error_code:
          enum:
            - 5999
          type: number
        message:
          example: For some unknown reason your request has not succeeded.
          type: string
        statusCode:
          enum:
            - 500
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object

````

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