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

# Get Messages

> Retrieve all messages from a session conversation.

Get the complete conversation history for a session with pagination support.
Messages are returned in chronological order.

**Path Parameters:**
- `custom_user_id` (str): Unique identifier for the user
- `session_id` (UUID): Session UUID to get messages from

**Query Parameters:**
- `offset` (int): Number of messages to skip for pagination. Default: 0
- `limit` (int): Maximum messages to return. Range: 1-500. Default: 50

**Returns:**
- `messages` (List[Message]): List of message objects with role, content, and timestamp
- `total` (int): Total number of messages in the session
- `has_more` (bool): Whether more messages are available beyond the current page



## OpenAPI

````yaml https://api.recallrai.com/api/openapi.json get /api/v1/users/{custom_user_id}/sessions/{session_id}/messages
openapi: 3.1.0
info:
  title: api-backend
  description: This powers the Recallr AI API Backend
  version: 0.1.0
servers:
  - url: https://api.recallrai.com
    description: Production server
security: []
paths:
  /api/v1/users/{custom_user_id}/sessions/{session_id}/messages:
    get:
      tags:
        - Sessions
      summary: Get Messages
      description: >-
        Retrieve all messages from a session conversation.


        Get the complete conversation history for a session with pagination
        support.

        Messages are returned in chronological order.


        **Path Parameters:**

        - `custom_user_id` (str): Unique identifier for the user

        - `session_id` (UUID): Session UUID to get messages from


        **Query Parameters:**

        - `offset` (int): Number of messages to skip for pagination. Default: 0

        - `limit` (int): Maximum messages to return. Range: 1-500. Default: 50


        **Returns:**

        - `messages` (List[Message]): List of message objects with role,
        content, and timestamp

        - `total` (int): Total number of messages in the session

        - `has_more` (bool): Whether more messages are available beyond the
        current page
      operationId: >-
        get_messages_api_v1_users__custom_user_id__sessions__session_id__messages_get
      parameters:
        - name: custom_user_id
          in: path
          required: true
          schema:
            type: string
            title: The custom user ID to get the messages for
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: The session ID to get the messages from
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            title: Number of messages to skip
            default: 0
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            title: Max number of messages to return
            default: 50
        - name: X-Recallr-Project-Id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            title: X-Recallr-Project-Id
        - name: X-Recallr-Api-Key
          in: header
          required: true
          schema:
            type: string
            title: X-Recallr-Api-Key
      responses:
        '200':
          description: Messages retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMessagesResponse'
        '401':
          description: Authentication required
        '404':
          description: User or session not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
components:
  schemas:
    GetMessagesResponse:
      properties:
        messages:
          items:
            $ref: '#/components/schemas/Message'
          type: array
          title: Messages
        total:
          type: integer
          title: Total
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - messages
        - total
        - has_more
      title: GetMessagesResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Message:
      properties:
        role:
          $ref: '#/components/schemas/MessageRole'
        content:
          type: string
          title: Content
        timestamp:
          type: string
          format: date-time
          title: Timestamp
      type: object
      required:
        - role
        - content
        - timestamp
      title: Message
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    MessageRole:
      type: string
      enum:
        - user
        - assistant
      title: MessageRole

````