Send a message and stream the reply

Sends the user's message to the bot and streams the reply as server-sent events. Events of type PartialResponse carry parts of a message while it is generated (data: PartialMessage). The stream ends with one event of type Response carrying the complete reply (data: MessageResponse) or of type Error (data: ErrorResponse).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Channel ID, shown in the admin panel

Body Params
string
required
length ≤ 64

Identifier of the conversation chosen by the caller; messages with the same ID continue one conversation. It must be unique across all conversations of the bot, on every channel, so use a random value such as a UUID.

string
required
length ≤ 4000

The user's message

string
required
length ≤ 128

Name of the author of the message

string
length ≤ 64
Defaults to api

How the user contacts you, e.g. api (the default), phone, mobile, whatsapp, facebook, skype, twitter, external; any other value is accepted as well. It is recorded with the conversation, and phone makes the bot understand the messages as transcribed speech.

extraData

Additional data passed to the bot and usable by it. Two forms are accepted:
(1) an object of key/value pairs - every value is treated as non-sensitive and kept for the whole conversation;
(2) an array of entries, each declaring its own sensitivity and lifetime.
A sensitive value may be used by the bot but is never shown in cleartext (masked in analytics and logs, encrypted at rest).
A request-lifetime value is available only for the current message and is not stored.

Headers
string
length ≤ 64
^[A-Za-z0-9._-]+$

Your identifier of the request. It is returned in the X-Request-ID response header and recorded with the request on our side, so you can match your logs with ours. A value that is longer than 64 characters or has characters other than letters, digits, ., _ and - is replaced with an identifier we generate.

string
enum

Marks the message as confidential user input, e.g. a password, PIN or one-time code entered during authentication.
When the header is present, the message text is not stored in cleartext anywhere in the platform: it is replaced with [confidential] in the conversation history, analytics and transcriptions, it is masked in logs, and language understanding results for the message are not stored. The bot itself still receives the original text and handles it as usual.
Any value enables the mode; true is the conventional one. Omit the header for regular messages.

Allowed:
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/event-stream
application/json