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 the connection. It returns shareUrl, the link to send, valid for 24 hours
curl -X POST https://api.platic.ai/v1/channels/connections \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type": "messenger", "agentId": "'"$AGENT_ID"'"}'
# 2. Check it until it is connected (or awaiting_selection)
curl https://api.platic.ai/v1/channels/connections/$CONNECTION_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" // 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;
expiresInMinutesallows 15 minutes to 7 days. - How it is completed (
completion):authorize(messenger,instagram,facebook-comments,instagram-comments): someone authorizes with Meta. The response hasshareUrl, a link you can send to whoever manages the page or account even if they have no Platica account, andauthorizeIn, the same step inside Platica for someone on your team. If the account has several pages or accounts, they are chosen inawaiting_selection.wizard(whatsapp,email,gmail,outlook):authorizeInopens that channel's wizard in Platica, with a session. There is noshareUrl. The connection becomesconnectedwhen the wizard creates the channel.
- Other types: your site's chat is created directly in Web chat (
409 USE_WEBCHATShere). Telegram, SMS, and voice are not available yet (409 CHANNEL_TYPE_NOT_AVAILABLE). - Channel health (
health): every channel reportsok,needs_reconnection,action_required,paused, ordisconnectedwith itsreason(see list channels). To reconnect a channel, request another connection of the sametype. - What each channel is (
platform):whatsapp,messenger,instagram,facebook_comments,instagram_comments,webchat, oremail. Every mailbox isemail, 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 opensauthorizeInneeds a Platica session and write access to Integrations; whoever opensshareUrlneeds neither.
Sending the link to someone else
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
shareUrlnorauthorizeInlets 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.
The token in the URL (chl_…) is the link's only credential: whoever has it can connect to your workspace the pages or accounts they have access to. Send it only to the person who will use it, through a private channel, and do not post it publicly. If it leaks, renew it or cancel the connection.
Endpoints
| Method | Endpoint | What it does |
|---|---|---|
GET | /v1/channels | List channels and their health |
GET | /v1/channels/{channelId} | Get a channel |
PATCH | /v1/channels/{channelId} | Change the name or defaultAgentId |
POST | /v1/channels/connections | Request a connection |
GET | /v1/channels/connections | List connections, newest first |
GET | /v1/channels/connections/{connectionId} | Check how a connection is going |
POST | /v1/channels/connections/{connectionId}/link | Issue another shareUrl; the previous one stops working |
POST | /v1/channels/connections/{connectionId}/select | Choose pages or accounts in awaiting_selection |
DELETE | /v1/channels/connections/{connectionId} | Cancel a pending connection |
POST | /v1/channels/{channelId}/disconnect | Disconnect 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.