> ## Documentation Index
> Fetch the complete documentation index at: https://sitegpt.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage chatbots with the CLI

> Create, rename, install, check, transfer, and delete SiteGPT chatbots from the command line.

Use these commands to create a chatbot, get its embed code, check how it is doing, and transfer or delete it. Most other CLI commands need the chatbot ID, so start with [Find your chatbot ID](#find-your-chatbot-id).

For every option of every command, see the [command reference](/docs/cli/command-reference#chatbots).

## Before you start

* A SiteGPT account on the Growth plan or above. See [Plans and limits](/docs/reference/plans-and-limits).
* The CLI installed and logged in. See [Install and log in](/docs/cli/install-login).
* The default access from `sitegpt login` is enough for the tasks on this page. Your role on the chatbot must also allow the action. See [Authentication](/docs/developers/authentication).

## Find your chatbot ID

List your chatbots:

```bash theme={null}
sitegpt chatbots list
```

To save the ID of the first chatbot in a shell variable, use JSON output and `jq`:

```bash theme={null}
CHATBOT_ID=$(sitegpt chatbots list --json | jq -r '.data.chatbots[0].id')
```

**Check that it works:** Run `sitegpt chatbots get YOUR_CHATBOT_ID`. The output shows the chatbot title, the ID, and the owner email.

## Create a chatbot

```bash theme={null}
sitegpt chatbots create "Support Bot" --description "Answers customer support questions"
```

You can also pass the title with `--title "Support Bot"`. Add `--json` to get the new ID in JSON.

**Check that it works:** The CLI prints `Created chatbot Support Bot (ID).` The new chatbot shows in `sitegpt chatbots list`.

Next, add content to the chatbot. See [Manage content](/docs/cli/knowledge).

## Rename a chatbot or change its description

```bash theme={null}
sitegpt chatbots update YOUR_CHATBOT_ID --title "Help Center Bot" --description "Answers help center questions"
```

You can pass `--title`, `--description`, or both.

**Check that it works:** The CLI prints `Updated chatbot Help Center Bot (ID).`

## Get the embed code

```bash theme={null}
sitegpt installation snippet --chatbot YOUR_CHATBOT_ID
```

The output has the chat link, the widget script URL, and the embed code. To add the embed code to your website, see [Add the chatbot to your website](/docs/guides/install/add-to-website).

**Check that it works:** Open the chat link in a browser. The chatbot opens and answers a test question.

## Check training and feedback

Get a summary of one chatbot:

```bash theme={null}
sitegpt dashboard --chatbot YOUR_CHATBOT_ID
```

The summary shows:

* The training state
* The total, trained, pending, and failed document counts
* The link, file, and page counts
* A summary of conversation feedback
* The chat link and the widget script URL

**Check that it works:** The `Documents` line shows `0 failed`. If it does not, see [Resync content](/docs/cli/knowledge#resync-content).

## See engagement analytics

```bash theme={null}
sitegpt analytics --chatbot YOUR_CHATBOT_ID --start 2026-08-01 --end 2026-08-19
```

The output shows totals for the range, such as widget opens, conversations started, unique visitors, escalations, and leads. It compares them with the previous period. Add `--json` to also get the daily series.

* Dates are UTC days in the format `YYYY-MM-DD`.
* If you leave out `--start` and `--end`, the range is the last 30 days.
* Your plan must include analytics. If it does not, the command fails with `403` and the code `ANALYTICS_LOCKED`.
* Insight counters show only when your plan includes insights.

See [Plans and limits](/docs/reference/plans-and-limits).

**Check that it works:** The first line shows the range that you asked for, for example `Range: 2026-08-01 to 2026-08-19 (UTC)`.

## Transfer a chatbot

Only a Super Admin of the chatbot can transfer it. The owner is always a Super Admin. The token needs the `chatbots:write`, `members:write`, and `members:delete` scopes.

```bash theme={null}
sitegpt chatbots transfer YOUR_CHATBOT_ID --email new-owner@example.com
```

* The new owner becomes a Super Admin of the chatbot.
* If the new owner has no SiteGPT account, SiteGPT creates one.
* By default, SiteGPT removes the previous owner from the chatbot.
* To keep the previous owner as a team member, add `--keep-source-as` with a role: `AGENT`, `MANAGER`, `ADMIN`, or `SUPER_ADMIN`. This adds a team member, so it counts toward the member limit.
* To use a user ID instead of an email, pass `--user-id YOUR_USER_ID`.

```bash theme={null}
sitegpt chatbots transfer YOUR_CHATBOT_ID --email teammate@example.com --keep-source-as ADMIN
```

**Check that it works:** The CLI prints `Transferred chatbot`, the title, the ID, and the new owner email. It also says if the previous owner was removed or kept, and with which role.

## Delete a chatbot

This deletes the chatbot. The command needs `--yes` to confirm.

```bash theme={null}
sitegpt chatbots delete YOUR_CHATBOT_ID --yes
```

**Check that it works:** The CLI prints `Deleted chatbot`, the title, and the ID. The chatbot is no longer in `sitegpt chatbots list`.

## Related

* [Customize a chatbot](/docs/cli/customization), including widget icons
* [Create a chatbot from a website](/docs/cli/playbooks/create-chatbot-from-website)
* Command reference: [Chatbots](/docs/cli/command-reference#chatbots), [Dashboard summary](/docs/cli/command-reference#dashboard-summary), [Engagement analytics](/docs/cli/command-reference#engagement-analytics), [Installation](/docs/cli/command-reference#installation)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.