Chat
Create conversation
Initiates a new conversation with a bot. Returns session information needed for subsequent interactions.
POST
/
v1
/
conversations
Create conversation
curl --request POST \
--url https://quick.bot/api/v1/conversations \
--header 'Content-Type: application/json' \
--data '
{
"publicId": "<string>",
"message": {
"type": "text",
"text": "<string>",
"value": "<string>",
"attachedFileUrls": [
"<string>"
],
"createdAt": 123
},
"prefilledVariables": {
"First name": "John",
"Email": "john@gmail.com"
},
"conversationId": "<string>"
}
'import requests
url = "https://quick.bot/api/v1/conversations"
payload = {
"publicId": "<string>",
"message": {
"type": "text",
"text": "<string>",
"value": "<string>",
"attachedFileUrls": ["<string>"],
"createdAt": 123
},
"prefilledVariables": {
"First name": "John",
"Email": "john@gmail.com"
},
"conversationId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
publicId: '<string>',
message: {
type: 'text',
text: '<string>',
value: '<string>',
attachedFileUrls: ['<string>'],
createdAt: 123
},
prefilledVariables: {'First name': 'John', Email: 'john@gmail.com'},
conversationId: '<string>'
})
};
fetch('https://quick.bot/api/v1/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://quick.bot/api/v1/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'publicId' => '<string>',
'message' => [
'type' => 'text',
'text' => '<string>',
'value' => '<string>',
'attachedFileUrls' => [
'<string>'
],
'createdAt' => 123
],
'prefilledVariables' => [
'First name' => 'John',
'Email' => 'john@gmail.com'
],
'conversationId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://quick.bot/api/v1/conversations"
payload := strings.NewReader("{\n \"publicId\": \"<string>\",\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"value\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ],\n \"createdAt\": 123\n },\n \"prefilledVariables\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"conversationId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://quick.bot/api/v1/conversations")
.header("Content-Type", "application/json")
.body("{\n \"publicId\": \"<string>\",\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"value\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ],\n \"createdAt\": 123\n },\n \"prefilledVariables\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"conversationId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quick.bot/api/v1/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"publicId\": \"<string>\",\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"value\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ],\n \"createdAt\": 123\n },\n \"prefilledVariables\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"conversationId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"bot": {
"id": "<string>",
"theme": {
"progressBar": {
"isEnabled": true,
"color": "<string>",
"backgroundColor": "<string>",
"thickness": 123
},
"chat": {
"container": {
"maxWidth": "<string>",
"maxHeight": "<string>",
"font": "<string>",
"backgroundColor": "<string>",
"background": {
"content": "<string>"
},
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"border": {
"thickness": 123,
"color": "<string>",
"roundness": 123,
"opacity": 0.5
}
},
"hostAvatar": {
"isEnabled": true,
"url": "<string>"
},
"guestAvatar": {
"isEnabled": true,
"url": "<string>"
},
"hostBubbles": {
"backgroundColor": "<string>",
"background": {
"content": "<string>"
},
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"border": {
"thickness": 123,
"color": "<string>",
"roundness": 123,
"opacity": 0.5
}
},
"guestBubbles": {
"backgroundColor": "<string>",
"background": {
"content": "<string>"
},
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"border": {
"thickness": 123,
"color": "<string>",
"roundness": 123,
"opacity": 0.5
}
},
"buttons": {
"backgroundColor": "<string>",
"background": {
"content": "<string>"
},
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"border": {
"thickness": 123,
"color": "<string>",
"roundness": 123,
"opacity": 0.5
}
},
"inputs": {
"backgroundColor": "<string>",
"background": {
"content": "<string>"
},
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"border": {
"thickness": 123,
"color": "<string>",
"roundness": 123,
"opacity": 0.5
},
"placeholderColor": "<string>"
}
},
"customCss": "<string>"
},
"settings": {
"general": {
"isBrandingEnabled": true,
"isTypingEmulationEnabled": true,
"isInputPrefillEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true,
"rememberUser": {
"isEnabled": true
}
},
"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>"
},
"whatsApp": {
"isEnabled": true,
"flowIds": {}
},
"publicShare": {
"isEnabled": true
},
"security": {
"allowedOrigins": [
"<string>"
]
}
},
"publishedAt": "<string>"
},
"actor": {
"role": "host",
"name": "<string>",
"avatarUrl": "<string>"
},
"messages": [
{
"id": "<string>",
"type": "text",
"content": {
"type": "markdown",
"markdown": "<string>"
}
}
],
"conversationId": "<string>",
"input": {
"id": "<string>",
"type": "text input",
"outgoingEdgeId": "<string>",
"options": {
"labels": {
"placeholder": "<string>",
"button": "<string>"
},
"variableId": "<string>",
"audioClip": {
"isEnabled": true,
"saveVariableId": "<string>"
},
"attachments": {
"isEnabled": true,
"saveVariableId": "<string>"
}
},
"prefilledValue": "<string>",
"runtimeOptions": {
"paymentIntentSecret": "<string>",
"amountLabel": "<string>",
"publicKey": "<string>"
}
},
"clientSideActions": [
{
"type": "scriptToExecute",
"scriptToExecute": {
"content": "<string>",
"args": [
{
"id": "<string>",
"value": "<string>"
}
],
"isCode": true
},
"lastBubbleBlockId": "<string>",
"expectsDedicatedReply": true
}
],
"logs": [
{
"status": "<string>",
"description": "<string>",
"details": "<unknown>"
}
],
"progress": 123,
"guestDisplayText": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Body
application/json
Published bot's public ID. Where to find it?
- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
{
"First name": "John",
"Email": "john@gmail.com"
}
Resume an existing conversation instead of starting a new one.
Response
Successful response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
messages
(Text · object | Image · object | Video · object | Audio · object | Embed · object)[]
required
- Text
- Image
- Video
- Audio
- Embed
Show child attributes
Show child attributes
- Text
- Buttons
- Email
- Number
- URL
- Phone number
- Date
- Payment
- MercadoPago Payment
- Rating
- File
Show child attributes
Show child attributes
clientSideActions
(Script to execute · object | Redirect · object | Wait · object | Set variable · object | Inject start props · object | Execute code · object)[]
Actions to execute on the client side
- Script to execute
- Redirect
- Wait
- Set variable
- Inject start props
- Execute code
Show child attributes
Show child attributes
Logs that were saved during the last execution
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.
⌘I
Create conversation
curl --request POST \
--url https://quick.bot/api/v1/conversations \
--header 'Content-Type: application/json' \
--data '
{
"publicId": "<string>",
"message": {
"type": "text",
"text": "<string>",
"value": "<string>",
"attachedFileUrls": [
"<string>"
],
"createdAt": 123
},
"prefilledVariables": {
"First name": "John",
"Email": "john@gmail.com"
},
"conversationId": "<string>"
}
'import requests
url = "https://quick.bot/api/v1/conversations"
payload = {
"publicId": "<string>",
"message": {
"type": "text",
"text": "<string>",
"value": "<string>",
"attachedFileUrls": ["<string>"],
"createdAt": 123
},
"prefilledVariables": {
"First name": "John",
"Email": "john@gmail.com"
},
"conversationId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
publicId: '<string>',
message: {
type: 'text',
text: '<string>',
value: '<string>',
attachedFileUrls: ['<string>'],
createdAt: 123
},
prefilledVariables: {'First name': 'John', Email: 'john@gmail.com'},
conversationId: '<string>'
})
};
fetch('https://quick.bot/api/v1/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://quick.bot/api/v1/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'publicId' => '<string>',
'message' => [
'type' => 'text',
'text' => '<string>',
'value' => '<string>',
'attachedFileUrls' => [
'<string>'
],
'createdAt' => 123
],
'prefilledVariables' => [
'First name' => 'John',
'Email' => 'john@gmail.com'
],
'conversationId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://quick.bot/api/v1/conversations"
payload := strings.NewReader("{\n \"publicId\": \"<string>\",\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"value\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ],\n \"createdAt\": 123\n },\n \"prefilledVariables\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"conversationId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://quick.bot/api/v1/conversations")
.header("Content-Type", "application/json")
.body("{\n \"publicId\": \"<string>\",\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"value\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ],\n \"createdAt\": 123\n },\n \"prefilledVariables\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"conversationId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://quick.bot/api/v1/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"publicId\": \"<string>\",\n \"message\": {\n \"type\": \"text\",\n \"text\": \"<string>\",\n \"value\": \"<string>\",\n \"attachedFileUrls\": [\n \"<string>\"\n ],\n \"createdAt\": 123\n },\n \"prefilledVariables\": {\n \"First name\": \"John\",\n \"Email\": \"john@gmail.com\"\n },\n \"conversationId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"bot": {
"id": "<string>",
"theme": {
"progressBar": {
"isEnabled": true,
"color": "<string>",
"backgroundColor": "<string>",
"thickness": 123
},
"chat": {
"container": {
"maxWidth": "<string>",
"maxHeight": "<string>",
"font": "<string>",
"backgroundColor": "<string>",
"background": {
"content": "<string>"
},
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"border": {
"thickness": 123,
"color": "<string>",
"roundness": 123,
"opacity": 0.5
}
},
"hostAvatar": {
"isEnabled": true,
"url": "<string>"
},
"guestAvatar": {
"isEnabled": true,
"url": "<string>"
},
"hostBubbles": {
"backgroundColor": "<string>",
"background": {
"content": "<string>"
},
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"border": {
"thickness": 123,
"color": "<string>",
"roundness": 123,
"opacity": 0.5
}
},
"guestBubbles": {
"backgroundColor": "<string>",
"background": {
"content": "<string>"
},
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"border": {
"thickness": 123,
"color": "<string>",
"roundness": 123,
"opacity": 0.5
}
},
"buttons": {
"backgroundColor": "<string>",
"background": {
"content": "<string>"
},
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"border": {
"thickness": 123,
"color": "<string>",
"roundness": 123,
"opacity": 0.5
}
},
"inputs": {
"backgroundColor": "<string>",
"background": {
"content": "<string>"
},
"color": "<string>",
"blur": 123,
"opacity": 0.5,
"border": {
"thickness": 123,
"color": "<string>",
"roundness": 123,
"opacity": 0.5
},
"placeholderColor": "<string>"
}
},
"customCss": "<string>"
},
"settings": {
"general": {
"isBrandingEnabled": true,
"isTypingEmulationEnabled": true,
"isInputPrefillEnabled": true,
"isHideQueryParamsEnabled": true,
"isNewResultOnRefreshEnabled": true,
"rememberUser": {
"isEnabled": true
}
},
"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>"
},
"whatsApp": {
"isEnabled": true,
"flowIds": {}
},
"publicShare": {
"isEnabled": true
},
"security": {
"allowedOrigins": [
"<string>"
]
}
},
"publishedAt": "<string>"
},
"actor": {
"role": "host",
"name": "<string>",
"avatarUrl": "<string>"
},
"messages": [
{
"id": "<string>",
"type": "text",
"content": {
"type": "markdown",
"markdown": "<string>"
}
}
],
"conversationId": "<string>",
"input": {
"id": "<string>",
"type": "text input",
"outgoingEdgeId": "<string>",
"options": {
"labels": {
"placeholder": "<string>",
"button": "<string>"
},
"variableId": "<string>",
"audioClip": {
"isEnabled": true,
"saveVariableId": "<string>"
},
"attachments": {
"isEnabled": true,
"saveVariableId": "<string>"
}
},
"prefilledValue": "<string>",
"runtimeOptions": {
"paymentIntentSecret": "<string>",
"amountLabel": "<string>",
"publicKey": "<string>"
}
},
"clientSideActions": [
{
"type": "scriptToExecute",
"scriptToExecute": {
"content": "<string>",
"args": [
{
"id": "<string>",
"value": "<string>"
}
],
"isCode": true
},
"lastBubbleBlockId": "<string>",
"expectsDedicatedReply": true
}
],
"logs": [
{
"status": "<string>",
"description": "<string>",
"details": "<unknown>"
}
],
"progress": 123,
"guestDisplayText": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}