POST
/
v1
/
typebots
/
{typebotId}
/
preview
/
startChat
curl --request POST \
  --url https://typebot.io/api/v1/typebots/{typebotId}/preview/startChat \
  --header 'Content-Type: application/json' \
  --data '{
  "isStreamEnabled": false,
  "message": {
    "type": "text",
    "text": "<string>",
    "attachedFileUrls": [
      "<string>"
    ]
  },
  "isOnlyRegistering": false,
  "typebot": {
    "version": "6",
    "id": "<string>",
    "groups": [
      {
        "id": "<string>",
        "title": "<string>",
        "graphCoordinates": {
          "x": 123,
          "y": 123
        },
        "blocks": [
          {
            "id": "<string>",
            "outgoingEdgeId": "<string>",
            "type": "start",
            "label": "<string>"
          }
        ]
      }
    ],
    "events": [
      {
        "id": "<string>",
        "outgoingEdgeId": "<string>",
        "graphCoordinates": {
          "x": 123,
          "y": 123
        },
        "type": "start"
      }
    ],
    "edges": [
      {
        "id": "<string>",
        "from": {
          "blockId": "<string>",
          "itemId": "<string>",
          "pathId": "<string>"
        },
        "to": {
          "groupId": "<string>",
          "blockId": "<string>"
        }
      }
    ],
    "variables": [
      {
        "id": "<string>",
        "name": "<string>",
        "isSessionVariable": true,
        "value": "<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>"
        }
      },
      "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,
        "startCondition": {
          "logicalOperator": "OR",
          "comparisons": [
            {
              "id": "<string>",
              "comparisonOperator": "Equal to",
              "value": "<string>"
            }
          ]
        },
        "sessionExpiryTimeout": 24.005
      },
      "publicShare": {
        "isEnabled": true
      },
      "security": {
        "allowedOrigins": [
          "<string>"
        ]
      }
    },
    "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>"
    },
    "updatedAt": "<string>",
    "workspaceId": "<string>"
  },
  "startFrom": {
    "type": "group",
    "groupId": "<string>"
  },
  "prefilledVariables": {
    "First name": "John",
    "Email": "[email protected]"
  },
  "sessionId": "<string>",
  "textBubbleContentFormat": "richText"
}'
{
  "sessionId": "<string>",
  "typebot": {
    "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>"
        }
      },
      "typingEmulation": {
        "enabled": true,
        "speed": 123,
        "maxDelay": 123,
        "delayBetweenBubbles": 2.5,
        "isDisabledOnFirstMessage": true
      }
    },
    "publishedAt": "<string>"
  },
  "lastMessageNewFormat": "<string>",
  "messages": [
    {
      "id": "<string>",
      "type": "text",
      "content": {
        "type": "richText",
        "richText": "<any>"
      }
    }
  ],
  "input": {
    "id": "<string>",
    "outgoingEdgeId": "<string>",
    "type": "text input",
    "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>",
      "publicKey": "<string>"
    }
  },
  "clientSideActions": [
    {
      "type": "scriptToExecute",
      "scriptToExecute": {
        "content": "<string>",
        "isCode": true,
        "args": [
          {
            "id": "<string>",
            "value": "<string>"
          }
        ]
      },
      "lastBubbleBlockId": "<string>",
      "expectsDedicatedReply": true
    }
  ],
  "logs": [
    {
      "status": "<string>",
      "description": "<string>",
      "details": "<string>",
      "context": "<string>"
    }
  ],
  "dynamicTheme": {
    "hostAvatarUrl": "<string>",
    "guestAvatarUrl": "<string>",
    "backgroundUrl": "<string>"
  },
  "progress": 123
}

Path Parameters

typebotId
string
required

Body

application/json

Response

200
application/json
Successful response

The response is of type object.