Skip to content

Channel

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

FieldTypeDescription
object_namestring?Object type identifier
idstringUnique channel ID
namestringChannel display name
type"web" | "facebook" | "whatsapp" | "instagram" | "wechat" | "line" | "email" | "wecom"Channel platform type
organization_idstringOrganization this channel belongs to
business_unit_idstring?Business unit ID
is_activebooleanWhether the channel is enabled
configobject?Channel-specific configuration
created_atstringISO 8601 creation timestamp
updated_atstringISO 8601 last-updated timestamp

ChannelCredential

FieldTypeDescription
_idstringUnique credential ID
typestring?Credential type (e.g. facebook, whatsapp)
namestring?Display name

Methods

Core CRUD

MethodTypeScriptPythonDescription
List channelslistlistList all channels, optionally filtered by type
Get channelgetgetGet a channel by ID
Create channelcreatecreateGeneric channel creation
Update channelupdateupdateToggle active state or update config
Delete channeldelete / deleteV3delete / delete_v3Delete a channel
Get countgetCountget_countTotal number of channels

Per-type Creation

MethodTypeScriptPythonDescription
Create WebcreateWebcreate_webWeb chat channel
Create FacebookcreateFacebookcreate_facebookFacebook Messenger channel
Update FacebookupdateFacebookupdate_facebookUpdate Facebook channel config
Create InstagramcreateInstagramcreate_instagramInstagram channel
Create EmailcreateEmailcreate_emailEmail channel
Create WeChatcreateWechatcreate_wechatWeChat channel
Create LINEcreateLinecreate_lineLINE channel
Create WhatsAppcreateWhatsAppcreate_whatsappWhatsApp channel
Update WhatsAppupdateWhatsAppupdate_whatsappUpdate WhatsApp config

Credentials

MethodTypeScriptPythonDescription
Get Facebook pagesgetFacebookPagesget_facebook_pagesList Facebook pages for a credential
Get credentialgetCredentialget_credentialGet a stored credential
Update credentialupdateCredentialupdate_credentialUpdate a credential
Delete credentialdeleteCredentialdelete_credentialRemove a credential

Workflow & Teams

MethodTypeScriptPythonDescription
Update channel workflowupdateChannelWorkflowupdate_channel_workflowAttach a workflow to a channel
Delete channel workflowdeleteChannelWorkflowdelete_channel_workflowDetach a workflow
List assignable teamslistAssignableTeamslist_assignable_teamsTeams that can be assigned to this channel
List team observerslistTeamObserverslist_team_observersObservers 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);
}

createWeb / create_web

const channel = await client.channel.createWeb({ name: "Website Chat" });
console.log(channel.id);

createWhatsApp / create_whatsapp

const channel = await client.channel.createWhatsApp({
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({
page_id: pages[0]._id,
credential_id: "credential_id",
});

createEmail / create_email

const channel = await client.channel.createEmail({
name: "Support Inbox",
email: "support@example.com",
});

update / update

await client.channel.update("channel_id", { active: false });