Send a message
To initiate a chat, do not provide a sessionId
nor a message
.
Continue the conversation by providing the sessionId
and the message
that should answer the previous question.
Set the isPreview
option to true
to chat with the non-published version of the typebot.
Request Body — REQUIRED |
---|
message stringThe answer to the previous chat input. Do not provide it if you are starting a new chat. |
sessionId stringSession ID that you get from the initial chat request to a bot. If not provided, it will create a new session. |
startParams objecttypebot — REQUIRED | isPreview booleanIf set to true , it will start a Preview session with the unpublished bot and it won't be saved in the Results tab. You need to be authenticated with a bearer token for this to work. | resultId stringProvide it if you'd like to overwrite an existing result. | prefilledVariables object | isStreamEnabled booleanSet this to true if you intend to stream OpenAI completions on a client. | isOnlyRegistering booleanIf set to true , it will only register the session and not start the chat. This is used for other chat platform integration as it can require a session to be registered before sending the first message. |
|
clientLogs object[]Logs while executing client side actions status string — REQUIRED | description string — REQUIRED | details |
|
Responses |
---|
Schema |
---|
messages object[] | input objectprefilledValue string | runtimeOptions objectpaymentIntentSecret string | amountLabel string | publicKey string |
|
| clientSideActions object[]lastBubbleBlockId string | expectsDedicatedReply boolean |
| sessionId string | typebot object | resultId string | dynamicTheme objecthostAvatarUrl string | guestAvatarUrl string |
| logs object[]status string | description string | details |
| lastMessageNewFormat stringThe sent message is validated and formatted on the backend. This is set only if the message differs from the formatted version. |
|
Schema |
---|
message string | code string | issues object[] |
|