> ## 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.

# Add Message

> Add a message to an active session.

Append a new message to the session's conversation history. The session must be in PENDING status.
Adding a message resets the auto-process timer, keeping the session active.

**Path Parameters:**
- `custom_user_id` (str): Unique identifier for the user
- `session_id` (UUID): Session UUID to add message to

**Body Parameters:**
- `message` (str): Message content text
- `role` (str): Message role (user, assistant)

**Returns:**
- `detail` (str): Success confirmation message



## OpenAPI

````yaml https://api.recallrai.com/api/openapi.json post /api/v1/users/{custom_user_id}/sessions/{session_id}/add-message
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}/add-message:
    post:
      tags:
        - Sessions
      summary: Add Message
      description: >-
        Add a message to an active session.


        Append a new message to the session's conversation history. The session
        must be in PENDING status.

        Adding a message resets the auto-process timer, keeping the session
        active.


        **Path Parameters:**

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

        - `session_id` (UUID): Session UUID to add message to


        **Body Parameters:**

        - `message` (str): Message content text

        - `role` (str): Message role (user, assistant)


        **Returns:**

        - `detail` (str): Success confirmation message
      operationId: >-
        add_message_api_v1_users__custom_user_id__sessions__session_id__add_message_post
      parameters:
        - name: custom_user_id
          in: path
          required: true
          schema:
            type: string
            title: The custom user ID to add the message for
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: The session ID to add the message to
        - 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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_add_message_api_v1_users__custom_user_id__sessions__session_id__add_message_post
      responses:
        '200':
          description: Message added successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddMessageResponse'
        '400':
          description: Bad request - Session already processed
        '401':
          description: Authentication required
        '404':
          description: Session not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
components:
  schemas:
    Body_add_message_api_v1_users__custom_user_id__sessions__session_id__add_message_post:
      properties:
        message:
          type: string
          title: The message to add
        role:
          type: string
          title: The role of the message
          examples:
            - user
            - assistant
      type: object
      required:
        - message
        - role
      title: >-
        Body_add_message_api_v1_users__custom_user_id__sessions__session_id__add_message_post
    AddMessageResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: AddMessageResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````