---
title: "JavaScript SDK: Conversations"
description: "Open and manage customer conversations with the Gleap JavaScript SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/425-javascript-sdk-conversations
collection: "Widget apps"
updated: 2026-11-01
language: en
---

# JavaScript SDK: Conversations

Open and manage customer conversations with the Gleap JavaScript SDK. Follow the integration code examples.

Open or start conversations in the Gleap widget programmatically. All methods take an optional `showBackButton` (default `true`) that controls whether the widget shows a back arrow.

![Current messenger conversation list with fictional conversations in the Pied Piper demo preview.](https://staticfiles.gleap.io/p613b5dd730aed737108f87ab/alunw0xM2jH2Vlpmy2xxQIgUY3FjcjnN5eEiS3vxfHTMxJHnnq4x0wUBPZSzb25XgGIYtMvcxCb.png)

## `Gleap.startConversation(showBackButton?)`

Start a new conversation in the widget.

```js
Gleap.startConversation();
```

## `Gleap.openConversations(showBackButton?)`

Open the conversation history overview.

```js
Gleap.openConversations();
```

## `Gleap.openConversation(shareToken, showBackButton?)`

Open a specific conversation by its share token.

```js
Gleap.openConversation("SHARE_TOKEN");
```

## `Gleap.startBot(botId, showBackButton?)`

Start a new conversation routed to a specific bot.

```js
Gleap.startBot("YOUR_BOT_ID");
```

## `Gleap.askAI(question, showBackButton?)`

Open the widget conversation flow with a question pre-asked to Kai Support.

```js
Gleap.askAI("How do I reset my password?");
```

## Related

- [JavaScript SDK: Feature requests](https://docs.gleap.ai/en/articles/426-javascript-sdk-feature-requests.md)
- [JavaScript SDK: Help center](https://docs.gleap.ai/en/articles/427-javascript-sdk-help-center.md)
- [JavaScript SDK: Release notes & news](https://docs.gleap.ai/en/articles/428-javascript-sdk-release-notes-and-news.md)
- [JavaScript SDK: Surveys](https://docs.gleap.ai/en/articles/429-javascript-sdk-surveys.md)
- [JavaScript SDK: Checklists](https://docs.gleap.ai/en/articles/430-javascript-sdk-checklists.md)
