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

# Channels

> Connect the places where the customers of a tenant write, using the tenant's own accounts.

A channel is a place where a customer writes to the business. Each tenant connects its own channels. The Partner API
connects them for you, and the tenant keeps ownership.

## What the Partner API connects

| Channel | Page | What the tenant brings |
| - | - | - |
| Website chat | [Website chat](https://docs.impellabs.tech/partners/channels/website.md) | Nothing. You give the sites that may show it. |
| WhatsApp | [Setup](https://docs.impellabs.tech/partners/channels/whatsapp/setup.md) | Its own WhatsApp Business Account and phone number. |
| Messenger and Instagram | [Messenger and Instagram](https://docs.impellabs.tech/partners/channels/meta.md) | Its own Facebook Page, with the Instagram account that is linked to it. |

## The tenant's own accounts

ImpelLabs does not give a tenant a number, a Page or a provider account. The tenant signs in to its own account with the
provider and allows ImpelLabs to use it. The provider bills the tenant for its own usage. No provider credential for a
customer is set on the platform. Where a route needs the platform's own app id, the answer gives it to you, and it
authorises nothing alone.

## Scopes

Reading a channel needs `channels:read`. Connecting, changing, switching on and disconnecting need `channels:write`.

## Switch an agent on

Connecting a channel does not start an agent. A WhatsApp number or a Page has the status `pending` until an agent answers
on it. Switch it on with the `activate` call and the id of the agent in `assistant_id`. Send `"on": false` to pause. A
paused channel keeps its connection. Use the id of an agent in the workspace of the tenant.

### Get an agent id

The Partner API has no call to create or list agents. Agents belong to the workspace of the tenant, so make one there:

1. The owner of the tenant signs in to the app with the `owner_email` address. The owner has no password, so the app
   sends a sign-in code to that address. You can also [set a password](https://docs.impellabs.tech/partners/console.md) for the owner.
2. The owner makes the agent in the app.
3. Read its id with `GET /api/v1/agents` and a workspace [API token](https://docs.impellabs.tech/api/authentication.md). The owner makes that token
   in the app. An [MCP](https://docs.impellabs.tech/connect/overview.md) connection of the same workspace lists agents too.

Keep the id with your own tenant record. Use it in every `activate` call for that tenant.

| Status | Meaning |
| - | - |
| `pending` | Connected. No agent answers. |
| `active` | An agent answers. |
| `paused` | You paused it. |

## Events

A change of status sends `channel.status_changed` to your [webhook endpoint](https://docs.impellabs.tech/partners/webhooks.md). A finished hosted
WhatsApp sign-up sends `channel.connected`.


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