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

# Send user message

> Appends a user message to the conversation. Encrypted conversations require `encryptionPassword` in the body for each new message.



## OpenAPI

````yaml POST /conversations/{conversationId}/messages
openapi: 3.1.1
info:
  title: QwixAI
  description: >-
    The official QwixAI REST API – Create and interact with AI characters
    programmatically. Built API-first, every feature available in the app is
    accessible via this API.
  license:
    name: MIT
  version: 0.0.1
servers:
  - url: https://api.qwix.chat/api/v1
security:
  - bearerAuth: []
paths:
  /conversations/{conversationId}/messages:
    post:
      summary: Send user message
      description: >-
        Appends a user message to the conversation. Encrypted conversations
        require `encryptionPassword` in the body for each new message.
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConversationMessageRequest'
      responses:
        '201':
          description: Message created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationMessage'
        '400':
          description: Invalid `content`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: Conversation not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
components:
  schemas:
    CreateConversationMessageRequest:
      type: object
      required:
        - content
      properties:
        content:
          type: string
          minLength: 1
          description: Non-empty after trim
        encryptionPassword:
          type: string
          minLength: 8
          description: >-
            Required when `encryptionEnabled` is true for this conversation.
            Used to derive the encryption key (not stored in the database).
    ConversationMessage:
      type: object
      required:
        - id
        - type
        - content
        - createdAt
      properties:
        id:
          type: string
          format: uuid
        type:
          $ref: '#/components/schemas/MessageType'
        content:
          type: string
        createdAt:
          type: string
          format: date-time
    ErrorBody:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error
    MessageType:
      type: string
      enum:
        - system
        - user
        - assistant
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT from `POST /auth/login`, or an API key via the same header depending
        on client configuration.

````