Start Chat
Endpoint used to start a new chat session in Toolzz Bots.
Request Example
Section titled “Request Example”curl --request POST \ --url 'https://bots-viewer.toolzz.ai/api/v1/typebots/{publicId}/startChat' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json'Response Example
Section titled “Response Example”{ "sessionId": "<string>", "resultId": "<string>", "typebot": { "id": "<string>", "theme": {}, "settings": {} }, "messages": [ { "id": "<string>", "type": "<string>", "content": "<any>" } ], "input": { "id": "<string>", "outgoingEdgeId": "<string>", "type": "<string>", "options": { "variableId": "<string>" } }}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (must contain “Bearer” before the token) | Yes |
URL Parameters (Path)
Section titled “URL Parameters (Path)”| Parameter | Type | Description | Required |
|---|---|---|---|
publicId | string | The public ID of the bot to start a chat for. | Yes |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
sessionId | string | Unique identifier of the created session. |
resultId | string | Unique identifier assigned to each individual response. |
typebot | any[] | Information about the bot. |
typebot.id | string | Unique identifier for the bot. |
typebot.theme | any | The visual appearance information of the bot. |
typebot.settings | any | The pre-set configuration of the bot. |
messages | object[] | The messages content and information in the bot session. |
messages[].id | string | Unique identifier for the message of the session. |
messages[].type | string | The format of the message sent. |
messages[].content | any | The content of the message sent. |
input | object | The bot input information. |
input.id | string | Unique identifier for the input of the session. |
input.outgoingEdgeId | string | Unique identifier of the edge that leads out from a specific input block in the bot flow. |
input.type | string | The type of content sent. |
input.options | object | The input options. |
input.options.variableId | string | The unique identifier of the variable that will store the user’s selection. |
Security
Section titled “Security”To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request.