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 objecttypebotId string โ 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. | resultId stringProvide it if you'd like to overwrite an existing result. | prefilledVariables object |
|
Responses |
---|
Schema |
---|
messages undefined[] | input objectprefilledValue string | runtimeOptions objectpaymentIntentSecret string | amountLabel string | publicKey string |
|
| logic objectredirect objecturl string | isNewTab boolean |
| codeToExecute objectcontent string | args object[] |
|
| integrations objectchatwoot objectcodeToExecute objectcontent string | args object[] |
|
| googleAnalytics objecttrackingId string | category string | action string | label string | value number |
|
| sessionId string | typebot objecttheme objectgeneral objectfont string | background objecttype stringPossible values: [Color , Image , None ] | content string |
|
| chat objecthostAvatar objectisEnabled boolean | url string |
| guestAvatar objectisEnabled boolean | url string |
| hostBubbles objectbackgroundColor string | color string |
| guestBubbles objectbackgroundColor string | color string |
| buttons objectbackgroundColor string | color string |
| inputs objectbackgroundColor string | color string | placeholderColor string |
|
| customCss string |
| settings objectgeneral objectisBrandingEnabled boolean | isTypingEmulationEnabled boolean | isInputPrefillEnabled boolean | isHideQueryParamsEnabled boolean | isNewResultOnRefreshEnabled boolean | isResultSavingEnabled boolean |
| typingEmulation objectenabled boolean | speed number | maxDelay number |
| metadata objecttitle string | description string | imageUrl string | favIconUrl string | customHeadCode string | googleTagManagerId string |
|
|
| resultId string |
|
Schema |
---|
message string | code string | issues object[] |
|