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. You need to be authenticated with a bearer token for this to work.

resultId string

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

startGroupId string

Start chat from a specific group.

prefilledVariables object
isStreamEnabled boolean

Set this to true if you intend to stream OpenAI completions on a client.

isOnlyRegistering boolean

If 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
200

Successful response

Schema
messages object[]
id string
input object
prefilledValue string
runtimeOptions object
paymentIntentSecret string
amountLabel string
publicKey string
clientSideActions object[]
lastBubbleBlockId string
expectsDedicatedReply boolean
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
roundness string

Possible values: [none, medium, large]

customCss string
settings object
general object
isBrandingEnabled boolean
isTypingEmulationEnabled boolean
isInputPrefillEnabled boolean
isHideQueryParamsEnabled boolean
isNewResultOnRefreshEnabled boolean
rememberUser object
isEnabled boolean
storage string

Possible values: [session, local]

typingEmulation object
enabled boolean
speed number
maxDelay number
metadata object
title string
description string
imageUrl string
favIconUrl string
customHeadCode string
googleTagManagerId string
whatsApp object
isEnabled boolean
startCondition object
logicalOperator string

Possible values: [OR, AND]

comparisons object[]
id string
comparisonOperator string

Possible values: [Equal to, Not equal, Contains, Does not contain, Greater than, Less than, Is set, Is empty, Starts with, Ends with, Matches regex, Does not match regex]

value string
sessionExpiryTimeout number

Possible values: 0.01 ≤ value ≤ 48

Expiration delay in hours after latest interaction

resultId string
dynamicTheme object
hostAvatarUrl string
guestAvatarUrl string
logs object[]
status string
description string
details
lastMessageNewFormat string

The sent message is validated and formatted on the backend. This is set only if the message differs from the formatted version.

default

Error response

Schema
message string
code string
issues object[]
message string