Skip to main content
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"
  },
  "resultId": "<string>"
}
'
{
  "sessionId": "<string>",
  "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,
        "sessionExpiryTimeout": 24.005,
        "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>"
      }
    }
  ],
  "resultId": "<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>"
}

Body

application/json
publicId
string
required

Published bot's public ID. Where to find it?

message
object
prefilledVariables
object
Example:
{
"First name": "John",
"Email": "john@gmail.com"
}
resultId
string

Overwrite an existing result.

Response

Successful response

sessionId
string
required

To save and use for /v1/conversations/{sessionId}/messages requests.

bot
object
required
actor
object
required
messages
(Text · object | Image · object | Video · object | Audio · object | Embed · object)[]
required
resultId
string
input
Text · object
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

logs
object[]

Logs that were saved during the last execution

progress
number

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.

guestDisplayText
string