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

# Send Chat Message



## OpenAPI

````yaml post /chats
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.callhq.ai/api
security:
  - apiKeyAuth: []
paths:
  /chats:
    post:
      tags:
        - Chat
      summary: Send Chat Message
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - sessionId
                - input
              properties:
                sessionId:
                  type: string
                  description: ID of the session to send the message to
                input:
                  type: string
                  description: User's message input
                assistantOverrides:
                  type: object
                  properties:
                    variableValues:
                      type: object
                      description: Dynamic variables to inject into the conversation
      responses:
        '200':
          description: Chat message sent successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatResponse'
        '400':
          description: Bad request - missing required fields
        '404':
          description: Session not found
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  schemas:
    ChatResponse:
      type: object
      properties:
        message:
          type: string
          description: Response message
        chat:
          type: object
          properties:
            id:
              type: string
              description: Unique identifier for the chat
            externalChatId:
              type: string
              description: External chat identifier
            sessionId:
              type: string
              description: ID of the session this chat belongs to
            input:
              type: string
              description: User's input message
            output:
              type: array
              items:
                type: object
                properties:
                  role:
                    type: string
                    enum:
                      - user
                      - assistant
                    description: Role of the message sender
                  content:
                    type: string
                    description: Content of the message
            assistantId:
              type: string
              description: ID of the assistant that responded
            status:
              type: string
              description: Status of the chat
            cost:
              type: number
              description: Cost of the chat interaction
            createdAt:
              type: string
              format: date-time
              description: Creation timestamp
            updatedAt:
              type: string
              format: date-time
              description: Last update timestamp
            assistantOverrides:
              type: object
              properties:
                variableValues:
                  type: object
                  description: Dynamic variables used in the conversation
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````