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

# Deploy to Channels

> Ship your agent to Web, Telegram, Slack, and API — from one definition.

## Choose your first channel

<Info>
  **Start with one channel.** Make it production-quality before adding the next. Each channel has unique behaviour — validate them separately.
</Info>

| Channel      | Best for                                    | Setup time | Guide                             |
| ------------ | ------------------------------------------- | ---------- | --------------------------------- |
| **Web**      | Demos, embedded chat, product copilots      | 30s        | This page                         |
| **Telegram** | Communities, async support, personal agents | 5 min      | [Telegram guide](./telegram-bots) |
| **Slack**    | Internal tools, team bots, B2B support      | 10 min     | [Slack guide](./slack-bots)       |
| **API**      | SaaS backends, programmatic agents          | 5 min      | [API reference](../api/overview)  |

## Web channel

The fastest way to deploy. Every bot gets a hosted web chat link instantly.

<Steps>
  <Step title="Open Channels tab">
    In your bot dashboard → **Channels** → **Web** → toggle **Active**.
  </Step>

  <Step title="Copy your link">
    Your bot is now live at:

    ```
    https://chat.bothive.cloud/b/{your-bot-id}
    ```

    Share this link anywhere — no setup required.
  </Step>

  <Step title="Embed on your site (optional)">
    Add the web widget to any HTML page:

    ```html theme={null}
    <script>
      window.BothiveConfig = {
        botId: 'your-bot-id',
        position: 'bottom-right',
        primaryColor: '#ffffff',
        greeting: 'Hey! How can I help?'
      };
    </script>
    <script src="https://cdn.bothive.cloud/widget.js" async></script>
    ```
  </Step>
</Steps>

## Telegram channel

<Steps>
  <Step title="Create a Telegram bot">
    Message **@BotFather** on Telegram → `/newbot` → follow prompts → copy the token.
  </Step>

  <Step title="Connect token to Bothive">
    **Channels** → **Telegram** → paste token → **Save**. Bothive sets the webhook automatically.
  </Step>

  <Step title="Verify the connection">
    Message your bot on Telegram. If it responds — you're live.
  </Step>
</Steps>

Full Telegram walkthrough: [Telegram Bots guide](./telegram-bots)

## Slack channel

<Steps>
  <Step title="Create a Slack app">
    [api.slack.com/apps](https://api.slack.com/apps) → **Create New App** → **From scratch**.
  </Step>

  <Step title="Add OAuth scopes">
    `chat:write`, `im:read`, `im:write`, `app_mentions:read`
  </Step>

  <Step title="Install to workspace and copy token">
    **OAuth & Permissions** → **Install to Workspace** → copy the `xoxb-` token.
  </Step>

  <Step title="Connect to Bothive">
    **Channels** → **Slack** → paste token → **Save**.
  </Step>

  <Step title="Invite to channels">
    In Slack: `/invite @YourBotName` in any channel.
  </Step>
</Steps>

Full Slack walkthrough: [Slack Bots guide](./slack-bots)

## API channel

```bash theme={null}
# Send a message to your bot via REST API
curl -X POST https://api.bothive.cloud/v1/bots/{bot_id}/chat \
  -H "Authorization: Bearer bh_sk_xxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "X-Session-ID: user_123" \
  -d '{"message": "What is my account status?"}'
```

Pass `X-Session-ID` to scope memory and conversation history per user.

Full API reference: [API Reference](../api/overview)

## Multi-channel HiveLang example

One agent deployed across all channels:

```hivelang theme={null}
bot UniversalAssistant {
  description: "Available on Web, Telegram, Slack, and API"

  capabilities {
    knowledgebase.search
    billing.getSubscription
    support.createTicket
  }

  instructions {
    You are a helpful assistant available on multiple channels.

    Adapt your response format based on where you're responding:
    - Web: Use markdown freely (headers, bold, bullet points)
    - Telegram: Use Telegram markdown (*bold*, _italic_, `code`)
    - Slack: Use Slack mrkdwn (*bold*, _italic_)
    - API: Return clean text, avoid markdown unless requested

    Keep all responses under 200 words unless complexity requires more.
    Always end with a next step or call to action.
  }
}
```

## Verifying each channel

After deploying to any channel, run this verification:

| Check               | How to verify                                               |
| ------------------- | ----------------------------------------------------------- |
| Message delivery    | Send a test message, confirm response arrives               |
| Session persistence | Send 2+ messages, confirm agent remembers context           |
| Tool calls          | Ask something requiring a tool, check trace confirms it ran |
| Formatting          | Review response formatting is correct for the channel       |
| Latency             | Response should arrive within 3s for simple queries         |

## Channel-level settings

Each channel has independent settings you can configure:

| Setting         | Description                          | Default                            |
| --------------- | ------------------------------------ | ---------------------------------- |
| Active          | Whether the channel accepts messages | Off                                |
| Rate limit      | Max messages per user per minute     | 10/min                             |
| Welcome message | Auto-sent on first user contact      | None                               |
| Error message   | Shown when agent fails               | "Something went wrong. Try again." |
| Timeout         | Max wait before error message        | 30s                                |

## Next reads

<CardGroup cols={3}>
  <Card title="Telegram Bots" icon="telegram" href="./telegram-bots" className="glass-effect" />

  <Card title="Slack Bots" icon="slack" href="./slack-bots" className="glass-effect" />

  <Card title="API Reference" icon="code" href="../api/overview" className="glass-effect" />
</CardGroup>
