Skip to main content
POST
Chat with one agent in a test conversation

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tenant
string
required

Tenant whose agents you are managing. Discover the tenants your credentials cover with listMyClaudiaProjects. A tenant your credentials do not cover is indistinguishable from one that does not exist.

id
string
required

Assistant to operate on, as returned by listAssistants (assistant_id field).

Body

application/json

The message to send, and which deployment the agent lives in.

One turn of a test conversation with a single agent: the message to send, and the thread to continue when there is one.

role
enum<string>
required

Deployment the assistant lives in — the deployment_role listAssistants returns for it: supervisor, react, or qna for a knowledge-base Q&A agent (which runs on the react deployment). Any other value answers 400.

Available options:
supervisor,
react,
qna
Example:

"react"

message
string
required

What the customer says this turn, verbatim and in the customer's own language. One turn per call: to keep the conversation going, send the next message with the threadId you got back.

Example:

"meu pedido 12345 ainda não chegou, o que houve?"

threadId
string | null

Thread of the test conversation to continue. Pass the threadId from the previous response and the agent answers with everything already said in that conversation in mind — this is how you send several messages to the same agent in sequence. Omit it to start a new conversation.

Example:

"6c7b1f2e-3a4d-4f5b-8c9d-0e1f2a3b4c5d"

Response

The turn finished and this is what the agent answered.

One turn of the test conversation: what the agent answered, the thread to continue it, and the whole history so far.

reply
string
required

The text of the agent's last reply in this turn. Empty when the turn ended without an assistant message — read messages then.

Example:

"Seu pedido 12345 saiu para entrega ontem e chega até amanhã."

messages
object[]
required

The whole test conversation so far, as the runtime stores it: every human, ai and tool message of the thread in order, earlier turns included, each with type and content. Free-form objects — read the keys rather than assuming a shape.

threadId
string | null

The test conversation this turn belongs to. Send it back as threadId on the next call to keep talking with the same history; a new one is created whenever you omit it.

Example:

"6c7b1f2e-3a4d-4f5b-8c9d-0e1f2a3b4c5d"