Reply in a test conversation
Served only where test conversations are switched on.
Says something as the visitor, exactly as the bot's channel delivers it: text alone for text
typed, or text with payload for a button tapped, both taken from that button in the bot's
last message. The bot answers asynchronously: read its answer with the GET beside this one.
Scope bots:write.
On a WhatsApp bot the visitor only types: it writes through Meta from a WhatsApp number, and Meta
lets no business send a tap, so a payload is refused with 422 (taps_not_offered_on_whatsapp).
Typing an option's text does not choose it: a reply buttons or list block takes typed text by its
default output, so only that path can be reached. The message reaches the bot through
Meta, and is stored under an id not known when this answers, so the message answered carries the
id of the last message the conversation held when it was sent: pass it as after to read the
visitor's message, once stored, and the bot's answers.
Path Parameters
- Type: stringFormat: uuidbot
_id required - Type: stringFormat: uuidconversation
_id requiredThe test conversation, as starting one answered it.
Body·
- Type: stringtextrequired
What the visitor typed, or the text of the button they tapped.
- Type: stringpayload
The payload of the button tapped, as the bot's message lists it. Leave it out for typed text, and always on a WhatsApp bot, where a tap is refused.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://api.landbot.io/v0-alpha/bots/123e4567-e89b-12d3-a456-426614174000/test/conversations/123e4567-e89b-12d3-a456-426614174000/messages \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Token YOUR_AGENT_TOKEN' \
--data '{
"text": "Yes, please",
"payload": "$0"
}'
{
"data": {
"id": "string",
"author": "bot",
"type": "dialog",
"text": null,
"buttons": [
{
"text": "Yes, please",
"payload": "$0"
}
],
"url": null,
"created_at": "2026-09-16T09:18:19"
}
}