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. |
clientLogs object[]Logs while executing client side actions status string — REQUIRED | description string — REQUIRED | details |
|
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 for this to work. | resultId stringProvide it if you'd like to overwrite an existing result. | startGroupId stringStart chat from a specific group. | prefilledVariables object | isStreamEnabled boolean |
|
| Responses |
|---|
| Schema |
|---|
messages object[] | input objectprefilledValue string | runtimeOptions objectpaymentIntentSecret string | amountLabel string | publicKey string |
|
| clientSideActions object[] | sessionId string | typebot objectid string | theme 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 |
| roundness stringPossible values: [none, medium, large] |
| customCss string |
| settings objectgeneral objectisBrandingEnabled boolean | isTypingEmulationEnabled boolean | isInputPrefillEnabled boolean | isHideQueryParamsEnabled boolean | isNewResultOnRefreshEnabled boolean | rememberUser objectisEnabled boolean | storage stringPossible values: [session, local] |
|
| typingEmulation objectenabled boolean | speed number | maxDelay number |
| metadata objecttitle string | description string | imageUrl string | favIconUrl string | customHeadCode string | googleTagManagerId string |
|
|
| resultId string | dynamicTheme objecthostAvatarUrl string | guestAvatarUrl string |
| logs object[]status string | description string | details |
|
|
| Schema |
|---|
message string | code string | issues object[] |
|