Channels

Connect WhatsApp, Messenger, Instagram, email, or web chat to publish your agents or add communication to your product. These endpoints connect the channel, check its health, and change its assigned agent.

You can connect a channel without an agent: incoming messages are saved in supervised conversations and sent to your webhooks. Assign an agent when you want automatic replies.

Quick example

// 1. Request a connection and hand the link to whoever will authorize
const conn = await platic.channels.connect({ type: 'messenger', agentId });
console.log('Authorize here:', conn.authorizeIn);

// 2. Wait until it finishes (or select assets if it returns awaiting_selection)
const done = await platic.channels.connections.wait(conn.id);

// 3. Change the agent of any channel whenever you want
await platic.channels.update(done.channels[0].id, { defaultAgentId: agentId });

What you need to know

  • Connect: start the connection and ask a person to complete it. It can create one or more channels. It expires in 24 hours by default; expiresInMinutes allows 15 minutes to 7 days.
  • How it is completed (completion):
    • authorize (messenger, instagram, facebook-comments, instagram-comments): someone authorizes with Meta. The response has shareUrl, a link you can send to whoever manages the page or account even if they have no Platica account, and authorizeIn, the same step inside Platica for someone on your team. If the account has several pages or accounts, they are chosen in awaiting_selection.
    • wizard (whatsapp, email, gmail, outlook): authorizeIn opens that channel's wizard in Platica, with a session. There is no shareUrl. The connection becomes connected when the wizard creates the channel.
  • Other types: your site's chat is created directly in Web chat (409 USE_WEBCHATS here). Telegram, SMS, and voice are not available yet (409 CHANNEL_TYPE_NOT_AVAILABLE).
  • Channel health (health): every channel reports ok, needs_reconnection, action_required, paused, or disconnected with its reason (see list channels). To reconnect a channel, request another connection of the same type.
  • What each channel is (platform): whatsapp, messenger, instagram, facebook_comments, instagram_comments, webchat, or email. Every mailbox is email, whether it is on your domain, Gmail, or Outlook. The service Platica uses underneath is not part of the channel.
  • Disconnect vs delete: disconnecting stops messages but keeps history and agent; deleting removes it from the workspace.
  • Permissions: requires Integrations. Reading needs platica:read; creating or changing needs write access to Integrations and, with OAuth, platica:write. Whoever opens authorizeIn needs a Platica session and write access to Integrations; whoever opens shareUrl needs neither.

Send shareUrl to the person who manages the Facebook page or Instagram account. It is available for Messenger, Instagram, and comments.

  • Who opens it: anyone with access to the page or account in Meta. They need no Platica account and do not have to be in your workspace. For someone on your team with a session there is authorizeIn, which does the same inside Platica; sending the link does not change how connecting works from inside the platform.
  • What they see: a Platica page (https://app.platica.mx/connect/chl_…) that says which workspace it connects to, which channel, who requested it (the API key's or the person's name), and when it expires. Continue signs them in with Facebook, they authorize, and they come back to the same page. If they authorized several pages or accounts, they choose which ones to connect there. They see nothing else of your workspace.
  • When it expires: at the same time as the connection, at expiresAt. An expired, cancelled, or replaced link says it no longer works and asks them to request a new one from whoever sent it.
  • If you need another one: renew the link while the connection is still pending, for example if you sent it to the wrong person or need more time. The previous link stops working right away and the connection expires with the new one. If the connection already expired, request another one.
  • To stop it: cancel the connection. Neither shareUrl nor authorizeIn lets anyone authorize after that.

When they are done, get the connection or list the pending ones: shareUrl comes back in every read while it is pending.

Endpoints

MethodEndpointWhat it does
GET/v1/channelsList channels and their health
GET/v1/channels/{channelId}Get a channel
PATCH/v1/channels/{channelId}Change the name or defaultAgentId
POST/v1/channels/connectionsRequest a connection
GET/v1/channels/connectionsList connections, newest first
GET/v1/channels/connections/{connectionId}Check how a connection is going
POST/v1/channels/connections/{connectionId}/linkIssue another shareUrl; the previous one stops working
POST/v1/channels/connections/{connectionId}/selectChoose pages or accounts in awaiting_selection
DELETE/v1/channels/connections/{connectionId}Cancel a pending connection
POST/v1/channels/{channelId}/disconnectDisconnect the channel
DELETE/v1/channels/{channelId}Remove the channel from the workspace

Step-by-step guides are in Put it on a channel, errors in Errors, and AI tools in Channels MCP.