Skip to main content
POST
/
get_inference
Send Message to Conversational AI Agent
curl --request POST \
  --url https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_inference \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "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"
}
EOF
{
  "data": {
    "msg": "User message sent for processing",
    "temp_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "user_message": {
      "user_message_id": "0913fa4c-7eac-4377-b801-58f0c1a151e6",
      "created_at": "2025-09-04T08:55:02.740Z"
    },
    "introductory_message": {
      "assistant_message_id": "ea93f6d3-c556-46a4-928a-ba4d818aa30f",
      "created_at": "2025-09-04T08:55:02.136Z"
    }
  }
}

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.

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

Body

application/json
chatbot_id
string<uuid>
required

UUID of the chatbot to which the message is sent.

Example:

"51de6a36-5532-49c2-888e-46754ce102ba"

conversation_id
string<uuid>
required

UUID of the ongoing conversation.

Example:

"96333140-53c3-4d1d-bbd1-edd150d46ea2"

messages
object
required

The message to send to the AI agent.

documents
object[]
conversation_type
enum<string>

Optional source channel of the conversation.

Available options:
whatsapp,
website,
instagram,
messenger
Example:

"whatsapp"

wa_message_ids
string[]

Optional array of WhatsApp message IDs to link with this message.

Example:
["wamid.HBgMOTE4MjM3NTAyNjEwFQIA"]
user_id
string

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
string

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"

Response

200 - application/json

User message accepted for processing.

data
object