client.channel manages messaging channels — the entry points through which contacts reach your AI agents. Supported channel types: Web, WhatsApp, Facebook Messenger, Instagram, Email, WeChat, LINE.
Schema
Channel
| Field | Type | Description |
|---|
object_name | string? | Object type identifier |
id | string | Unique channel ID |
name | string | Channel display name |
type | "web" | "facebook" | "whatsapp" | "instagram" | "wechat" | "line" | "email" | "wecom" | Channel platform type |
organization_id | string | Organization this channel belongs to |
business_unit_id | string? | Business unit ID |
is_active | boolean | Whether the channel is enabled |
config | object? | Channel-specific configuration |
created_at | string | ISO 8601 creation timestamp |
updated_at | string | ISO 8601 last-updated timestamp |
ChannelCredential
| Field | Type | Description |
|---|
_id | string | Unique credential ID |
type | string? | Credential type (e.g. facebook, whatsapp) |
name | string? | Display name |
Methods
Core CRUD
| Method | TypeScript | Python | Description |
|---|
| List channels | list | list | List all channels, optionally filtered by type |
| Get channel | get | get | Get a channel by ID |
| Create channel | create | create | Generic channel creation |
| Update channel | update | update | Toggle active state or update config |
| Delete channel | delete / deleteV3 | delete / delete_v3 | Delete a channel |
| Get count | getCount | get_count | Total number of channels |
Per-type Creation
| Method | TypeScript | Python | Description |
|---|
| Create Web | createWeb | create_web | Web chat channel |
| Create Facebook | createFacebook | create_facebook | Facebook Messenger channel |
| Update Facebook | updateFacebook | update_facebook | Update Facebook channel config |
| Create Instagram | createInstagram | create_instagram | Instagram channel |
| Create Email | createEmail | create_email | Email channel |
| Create WeChat | createWechat | create_wechat | WeChat channel |
| Create LINE | createLine | create_line | LINE channel |
| Create WhatsApp | createWhatsApp | create_whatsapp | WhatsApp channel |
| Update WhatsApp | updateWhatsApp | update_whatsapp | Update WhatsApp config |
Credentials
| Method | TypeScript | Python | Description |
|---|
| Get Facebook pages | getFacebookPages | get_facebook_pages | List Facebook pages for a credential |
| Get credential | getCredential | get_credential | Get a stored credential |
| Update credential | updateCredential | update_credential | Update a credential |
| Delete credential | deleteCredential | delete_credential | Remove a credential |
Workflow & Teams
| Method | TypeScript | Python | Description |
|---|
| Update channel workflow | updateChannelWorkflow | update_channel_workflow | Attach a workflow to a channel |
| Delete channel workflow | deleteChannelWorkflow | delete_channel_workflow | Detach a workflow |
| List assignable teams | listAssignableTeams | list_assignable_teams | Teams that can be assigned to this channel |
| List team observers | listTeamObservers | list_team_observers | Observers of a team |
list / list
const channels = await client.channel.list({ type: "whatsapp" });
for (const ch of channels) {
console.log(ch.id, ch.name, ch.is_active);
channels = client.channel.list(type="whatsapp")
print(ch.id, ch.name, ch.is_active)
createWeb / create_web
const channel = await client.channel.createWeb({ name: "Website Chat" });
channel = client.channel.create_web("Website Chat")
createWhatsApp / create_whatsapp
const channel = await client.channel.createWhatsApp({
phone_number_id: "phone_number_id",
access_token: "whatsapp_access_token",
channel = client.channel.create_whatsapp({
"phone_number_id": "phone_number_id",
"access_token": "whatsapp_access_token",
createFacebook / create_facebook
// First get available pages for a credential
const pages = await client.channel.getFacebookPages("credential_id");
// Then create the channel with a page
const channel = await client.channel.createFacebook({
credential_id: "credential_id",
pages = client.channel.get_facebook_pages("credential_id")
channel = client.channel.create_facebook({
"page_id": pages[0]["_id"],
"credential_id": "credential_id",
createEmail / create_email
const channel = await client.channel.createEmail({
email: "support@example.com",
channel = client.channel.create_email({
"email": "support@example.com",
update / update
await client.channel.update("channel_id", { active: false });
client.channel.update("channel_id", {"active": False})