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

# Send Message to Conversational AI Agent

Sends a message from the user to the Conversational AI agent for processing.


## OpenAPI

````yaml post /get_inference
openapi: 3.0.0
info:
  title: Chatzy AI API
  version: 1.0.0
  description: >-
    Chatzy AI REST API for messaging, contact conversations, and agent
    interactions.
  contact:
    name: Chatzy
    url: https://chatzy.ai
    email: support@chatzy.ai
servers:
  - url: https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod
    description: Production Server
security: []
tags:
  - name: Authentication
    description: Authentication to access the API
  - name: Contact Conversations
    description: Get contact conversations
  - name: Conversational AI Agent Interactions
    description: Interact with the conversational AI agent
  - name: Authorized iframe Access
    description: APIs for authorized iframe access
paths:
  /get_inference:
    post:
      tags:
        - Conversational AI Agent Interactions
      summary: Send Message to Conversational AI Agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - chatbot_id
                - conversation_id
                - messages
              properties:
                chatbot_id:
                  type: string
                  format: uuid
                  description: UUID of the chatbot to which the message is sent.
                  example: 51de6a36-5532-49c2-888e-46754ce102ba
                conversation_id:
                  type: string
                  format: uuid
                  description: UUID of the ongoing conversation.
                  example: 96333140-53c3-4d1d-bbd1-edd150d46ea2
                messages:
                  type: object
                  required:
                    - role
                    - content
                  description: The message to send to the AI agent.
                  properties:
                    role:
                      type: string
                      enum:
                        - user
                      description: Role of the message sender. Only 'user' is allowed here.
                      example: user
                    content:
                      type: string
                      description: Text content of the user's message.
                      example: Hi, I'm looking to book a stay at Sunset Villa.
                documents:
                  type: array
                  items:
                    type: object
                    properties:
                      file_name:
                        type: string
                        description: Name of the document.
                        example: document.pdf
                      mime_type:
                        type: string
                        description: MIME type of the document.
                        example: application/pdf
                      s3_url:
                        type: string
                        description: URL of the document in S3.
                        example: https://s3.amazonaws.com/my-bucket/doc-1234
                conversation_type:
                  type: string
                  enum:
                    - whatsapp
                    - website
                    - instagram
                    - messenger
                  description: Optional source channel of the conversation.
                  example: whatsapp
                wa_message_ids:
                  type: array
                  items:
                    type: string
                  description: >-
                    Optional array of WhatsApp message IDs to link with this
                    message.
                  example:
                    - wamid.HBgMOTE4MjM3NTAyNjEwFQIA
                user_id:
                  type: string
                  description: >-
                    Optional unique identifier of the user (internal mapping).
                    Passing this will create a new contact if it doesn't exist
                    in Chatzy AI.
                  example: user-143242
                client_message_key:
                  type: string
                  description: >-
                    Optional unique identifier (client_message_key) used to link
                    multiple audio inputs to a single user message. Each
                    client_message_key is unique per user message and is
                    generated before the user sends a message.


                    Example:

                    - A client generates a client_message_key (e.g., 'msg_123').

                    - The user records and sends audio inputs 2-3 times. Each
                    audio input request is sent to the `/stt` endpoint along
                    with the same client_message_key. The server transcribes
                    each audio input.

                    - When the user finalizes their message, the same
                    client_message_key is included in the `/get-inference`
                    request. This links all the audio inputs, in the order they
                    were provided, to the finalized user message.


                    This ensures conversations can be reconstructed accurately
                    by mapping the final user message to the sequence of audio
                    inputs associated with it.
                  example: 22bacb4e-43ff-41e2-9800-ac62f33104ec
            example:
              chatbot_id: 51de6a36-5532-49c2-888e-46754ce102ba
              conversation_id: 96333140-53c3-4d1d-bbd1-edd150d46ea2
              messages:
                role: user
                content: Hi, I'd like to plan my trip.
              conversation_type: website
      responses:
        '200':
          description: User message accepted for processing.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      msg:
                        type: string
                        example: User message sent for processing
                      temp_token:
                        type: string
                        example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
                      user_message:
                        type: object
                        properties:
                          user_message_id:
                            type: string
                            format: uuid
                            example: 0913fa4c-7eac-4377-b801-58f0c1a151e6
                          created_at:
                            type: string
                            format: date-time
                            example: '2025-09-04T08:55:02.740Z'
                        required:
                          - user_message_id
                          - created_at
                      introductory_message:
                        type: object
                        properties:
                          assistant_message_id:
                            type: string
                            format: uuid
                            example: ea93f6d3-c556-46a4-928a-ba4d818aa30f
                          created_at:
                            type: string
                            format: date-time
                            example: '2025-09-04T08:55:02.136Z'
                        required:
                          - assistant_message_id
                          - created_at
                        description: >-
                          Only present for the first user message in a
                          conversation.
                    required:
                      - msg
                      - temp_token
                      - user_message

````