Test the agent in a chat
send_test_chat_messageTest the agent in a chat
Sends a message to the agent as a customer would write it and returns the agent's answer
in the same response, so you can check how it answers after changing its instructions,
knowledge or attachments. Leave conversation_id out to start a new test chat; send the
conversation_id of an earlier answer to continue it, so the agent sees the whole chat.
Only test chats can be continued: a customer's conversation is 404 not_found.
The AI answers exactly as it does for customers, with its knowledge, tools, attachments
and lead capture. Its tools run for real: a test can book a calendar slot, capture a
lead or call your company's own API. Each answer counts against your plan's message limit,
like any AI reply; over the limit, nothing is saved and the answer is
402 message_limit_exceeded. A test chat is saved like one from the dashboard's test chat,
under a customer named after the key or the AI assistant.
The request waits up to 30 seconds for the answer. status says how it went:
replied with the agent's messages in replies; pending when no answer came in time
(read it later with listConversationMessages and after set to message_id); or
no_reply when the AI is switched off or paused in that chat. One message at a time per
test chat: sending another while one waits is 409 test_chat_busy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The message, as a customer would write it; text that is only spaces is refused. | |
| agent_id | Yes | The agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`. | |
| conversation_id | No | A test chat of this agent to continue, from an earlier answer's `conversation_id`. Leave it out to start a new test chat. |