Skip to main content

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 string

The answer to the previous chat input. Do not provide it if you are starting a new chat.

sessionId string

Session ID that you get from the initial chat request to a bot. If not provided, it will create a new session.

startParams object
typebot โ€” REQUIRED

Either a Typebot ID or a Typebot object. If you provide a Typebot object, it will be executed in preview mode. (How can I find my typebot ID?).

isPreview boolean

If set to true, it will start a Preview session with the unpublished bot and it won't be saved in the Results tab.

resultId string

Provide it if you'd like to overwrite an existing result.

startGroupId string

Start chat from a specific group.

prefilledVariables object
Responses
200

Successful response

Schema
messages undefined[]
input object
prefilledValue string
runtimeOptions object
paymentIntentSecret string
amountLabel string
publicKey string
logic object
redirect object
url string
isNewTab boolean
codeToExecute object
content string
args object[]
id string
value
integrations object
chatwoot object
codeToExecute object
content string
args object[]
id string
value
googleAnalytics object
trackingId string
category string
action string
label string
value number
sessionId string
typebot object
id string
theme object
general object
font string
background object
type string

Possible values: [Color, Image, None]

content string
chat object
hostAvatar object
isEnabled boolean
url string
guestAvatar object
isEnabled boolean
url string
hostBubbles object
backgroundColor string
color string
guestBubbles object
backgroundColor string
color string
buttons object
backgroundColor string
color string
inputs object
backgroundColor string
color string
placeholderColor string
customCss string
settings object
general object
isBrandingEnabled boolean
isTypingEmulationEnabled boolean
isInputPrefillEnabled boolean
isHideQueryParamsEnabled boolean
isNewResultOnRefreshEnabled boolean
isResultSavingEnabled boolean
typingEmulation object
enabled boolean
speed number
maxDelay number
metadata object
title string
description string
imageUrl string
favIconUrl string
customHeadCode string
googleTagManagerId string
resultId string
dynamicTheme object
hostAvatarUrl string
guestAvatarUrl string
default

Error response

Schema
message string
code string
issues object[]
message string