curl --request POST \
--url http://127.0.0.1:3333/v3/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "http://127.0.0.1:3333/v3/sessions"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('http://127.0.0.1:3333/v3/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"sessionId": "<string>",
"bot": {
"id": "<string>",
"version": "3",
"theme": {
"general": {
"font": "<string>",
"background": {
"type": "Color",
"content": "<string>"
},
"progressBar": {
"isEnabled": true,
"color": "<string>",
"backgroundColor": "<string>",
"placement": "Top",
"thickness": 123,
"position": "fixed"
}
},
"chat": {
"container": {
"maxWidth": "<string>",
"maxHeight": "<string>",
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"hostAvatar": {
"isEnabled": true,
"url": "<string>"
},
"guestAvatar": {
"isEnabled": true,
"url": "<string>"
},
"hostBubbles": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"guestBubbles": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"buttons": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"inputs": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
},
"placeholderColor": "<string>"
},
"roundness": "none",
"buttonsInput": {
"layout": "wrap"
}
},
"customCss": "<string>"
},
"settings": {
"general": {
"isBrandingEnabled": true,
"isTypingEmulationEnabled": true,
"isInputPrefillEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true,
"rememberUser": {
"isEnabled": true,
"storage": "session"
},
"systemMessages": {
"invalidMessage": "<string>",
"botClosed": "<string>",
"networkErrorTitle": "<string>",
"networkErrorMessage": "<string>",
"popupBlockedTitle": "<string>",
"popupBlockedDescription": "<string>",
"popupBlockedButtonLabel": "<string>",
"fileUploadError": "<string>",
"fileUploadSizeError": "<string>",
"whatsAppPictureChoiceSelectLabel": "<string>",
"instagramPictureChoiceSelectLabel": "<string>",
"tiktokPictureChoiceSelectLabel": "<string>",
"facebookPictureChoiceSelectLabel": "<string>",
"telegramPictureChoiceSelectLabel": "<string>"
}
},
"typingEmulation": {
"enabled": true,
"speed": 123,
"maxDelay": 123,
"delayBetweenBubbles": 2.5,
"isDisabledOnFirstMessage": true
},
"metadata": {
"title": "<string>",
"description": "<string>",
"imageUrl": "<string>",
"favIconUrl": "<string>",
"customHeadCode": "<string>",
"googleTagManagerId": "<string>",
"allowIndexing": true
},
"security": {
"allowedOrigins": [
"<string>"
]
},
"storagePolicy": {
"persistInSendbotResults": true,
"persistInChatSession": true,
"persistInBrowserStorage": true,
"persistInBrowserIndexedDb": true,
"externalSyncMode": "off",
"chatSessionTtlMinutes": 123
}
},
"publishedAt": "2023-11-07T05:31:56Z"
},
"messages": [
{
"id": "<string>",
"type": "text",
"content": {
"type": "richText",
"richText": "<array>"
},
"isStreamingFinal": true
}
],
"result": {
"id": "<string>",
"isCompleted": true
},
"resultId": "<string>",
"sessionRestoreToken": "<string>",
"sessionStatus": "OPEN",
"lastMessageNewFormat": "<string>",
"input": {
"id": "<string>",
"type": "text input",
"outgoingEdgeId": "<string>",
"options": {
"labels": {
"placeholder": "<string>",
"button": "<string>"
},
"variableId": "<string>",
"isLong": true,
"audioClip": {
"isEnabled": true,
"saveVariableId": "<string>",
"visibility": "Auto"
},
"attachments": {
"isEnabled": true,
"saveVariableId": "<string>",
"visibility": "Auto"
}
},
"prefilledValue": "<string>",
"runtimeOptions": {
"paymentIntentSecret": "<string>",
"amountLabel": "<string>",
"resolvedAmount": 1,
"publicKey": "<string>",
"preferenceId": "<string>",
"paymentMethods": {
"atm": true,
"bankTransfer": true,
"ticket": true,
"debitCard": true,
"creditCard": true,
"mercadopago": true,
"onboarding_credits": true,
"wallet_purchase": true
},
"maxInstallments": 123
}
},
"clientSideActions": [
{
"type": "mcpConfirmation",
"mcpConfirmation": {
"requestId": "<string>",
"token": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"serverName": "<string>",
"serverOrigin": "<string>",
"toolName": "<string>",
"argumentsHash": "<string>",
"argumentKeys": [
"<string>"
]
},
"lastBubbleBlockId": "<string>",
"expectsDedicatedReply": true
}
],
"logs": [
{
"description": "<string>",
"status": "<string>",
"details": "<string>",
"context": "<string>"
}
],
"dynamicTheme": {
"hostAvatarUrl": "<string>",
"guestAvatarUrl": "<string>",
"backgroundUrl": "<string>"
},
"progress": 123
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"redirectUrl": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Start Session
Start a new chat session.
curl --request POST \
--url http://127.0.0.1:3333/v3/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "http://127.0.0.1:3333/v3/sessions"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('http://127.0.0.1:3333/v3/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"sessionId": "<string>",
"bot": {
"id": "<string>",
"version": "3",
"theme": {
"general": {
"font": "<string>",
"background": {
"type": "Color",
"content": "<string>"
},
"progressBar": {
"isEnabled": true,
"color": "<string>",
"backgroundColor": "<string>",
"placement": "Top",
"thickness": 123,
"position": "fixed"
}
},
"chat": {
"container": {
"maxWidth": "<string>",
"maxHeight": "<string>",
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"hostAvatar": {
"isEnabled": true,
"url": "<string>"
},
"guestAvatar": {
"isEnabled": true,
"url": "<string>"
},
"hostBubbles": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"guestBubbles": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"buttons": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
}
},
"inputs": {
"backgroundColor": "<string>",
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"shadow": "none",
"border": {
"thickness": 123,
"color": "<string>",
"roundeness": "none",
"customRoundeness": 123,
"opacity": 0.5
},
"placeholderColor": "<string>"
},
"roundness": "none",
"buttonsInput": {
"layout": "wrap"
}
},
"customCss": "<string>"
},
"settings": {
"general": {
"isBrandingEnabled": true,
"isTypingEmulationEnabled": true,
"isInputPrefillEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true,
"rememberUser": {
"isEnabled": true,
"storage": "session"
},
"systemMessages": {
"invalidMessage": "<string>",
"botClosed": "<string>",
"networkErrorTitle": "<string>",
"networkErrorMessage": "<string>",
"popupBlockedTitle": "<string>",
"popupBlockedDescription": "<string>",
"popupBlockedButtonLabel": "<string>",
"fileUploadError": "<string>",
"fileUploadSizeError": "<string>",
"whatsAppPictureChoiceSelectLabel": "<string>",
"instagramPictureChoiceSelectLabel": "<string>",
"tiktokPictureChoiceSelectLabel": "<string>",
"facebookPictureChoiceSelectLabel": "<string>",
"telegramPictureChoiceSelectLabel": "<string>"
}
},
"typingEmulation": {
"enabled": true,
"speed": 123,
"maxDelay": 123,
"delayBetweenBubbles": 2.5,
"isDisabledOnFirstMessage": true
},
"metadata": {
"title": "<string>",
"description": "<string>",
"imageUrl": "<string>",
"favIconUrl": "<string>",
"customHeadCode": "<string>",
"googleTagManagerId": "<string>",
"allowIndexing": true
},
"security": {
"allowedOrigins": [
"<string>"
]
},
"storagePolicy": {
"persistInSendbotResults": true,
"persistInChatSession": true,
"persistInBrowserStorage": true,
"persistInBrowserIndexedDb": true,
"externalSyncMode": "off",
"chatSessionTtlMinutes": 123
}
},
"publishedAt": "2023-11-07T05:31:56Z"
},
"messages": [
{
"id": "<string>",
"type": "text",
"content": {
"type": "richText",
"richText": "<array>"
},
"isStreamingFinal": true
}
],
"result": {
"id": "<string>",
"isCompleted": true
},
"resultId": "<string>",
"sessionRestoreToken": "<string>",
"sessionStatus": "OPEN",
"lastMessageNewFormat": "<string>",
"input": {
"id": "<string>",
"type": "text input",
"outgoingEdgeId": "<string>",
"options": {
"labels": {
"placeholder": "<string>",
"button": "<string>"
},
"variableId": "<string>",
"isLong": true,
"audioClip": {
"isEnabled": true,
"saveVariableId": "<string>",
"visibility": "Auto"
},
"attachments": {
"isEnabled": true,
"saveVariableId": "<string>",
"visibility": "Auto"
}
},
"prefilledValue": "<string>",
"runtimeOptions": {
"paymentIntentSecret": "<string>",
"amountLabel": "<string>",
"resolvedAmount": 1,
"publicKey": "<string>",
"preferenceId": "<string>",
"paymentMethods": {
"atm": true,
"bankTransfer": true,
"ticket": true,
"debitCard": true,
"creditCard": true,
"mercadopago": true,
"onboarding_credits": true,
"wallet_purchase": true
},
"maxInstallments": 123
}
},
"clientSideActions": [
{
"type": "mcpConfirmation",
"mcpConfirmation": {
"requestId": "<string>",
"token": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"serverName": "<string>",
"serverOrigin": "<string>",
"toolName": "<string>",
"argumentsHash": "<string>",
"argumentKeys": [
"<string>"
]
},
"lastBubbleBlockId": "<string>",
"expectsDedicatedReply": true
}
],
"logs": [
{
"description": "<string>",
"status": "<string>",
"details": "<string>",
"context": "<string>"
}
],
"dynamicTheme": {
"hostAvatarUrl": "<string>",
"guestAvatarUrl": "<string>",
"backgroundUrl": "<string>"
},
"progress": 123
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"redirectUrl": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
- Option 1
- Option 2
Show child attributes
Show child attributes
web, api, whatsapp, instagram, facebook, telegram, gmail, tiktok Show child attributes
Show child attributes
richText, markdown - Option 1
- Option 2
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Response
Default Response
- Option 1
- Option 2
To save and use for /continueChat requests.
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
Show child attributes
Show child attributes
OPEN, PAUSED, CLOSED The sent message is validated and formatted on the backend. For example, if for a date input you replied something like tomorrow, the backend will convert it to a date string. This field returns the formatted message.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
Show child attributes
Show child attributes
Actions to execute on the client side
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
Show child attributes
Show child attributes
Logs that were saved during the last execution
Show child attributes
Show child attributes
If the bot contains dynamic avatars, dynamicTheme returns the new avatar URLs whenever their variables are updated.
Show child attributes
Show child attributes
If progress bar is enabled, this field will return a number between 0 and 100 indicating the current progress based on the longest remaining path of the flow.