P PoriFyx - Create AI-powered chat docs

API reference

Messaging channels

Messaging channels let an agent answer on Telegram, WhatsApp, Facebook Messenger, Instagram, SMS (Twilio) and email. Connect them under /app/channels. Every inbound message is answered by the same AI pipeline as the website widget, conversations appear in the inbox, and a teammate who takes over replies through the same channel.

Plan access and message limits

Platform admins choose per plan, in Admin → Plans → Messaging channels, which channels are included and how many replies (AI and team) a workspace may send on each channel per calendar month. An empty limit means unlimited. Access is checked when a channel is connected or resumed and on every inbound message, so a downgrade takes effect immediately. Quota is reserved with a single atomic database update, so concurrent messages can never exceed the cap. When the cap is reached the channel shows Monthly limit reached and stops replying until the next month.

Security

  • Each channel gets a webhook URL containing a random secret.
  • Every request must also carry a valid provider signature: Telegram secret token, Meta X-Hub-Signature-256, Twilio X-Twilio-Signature, or Mailgun HMAC with a 15-minute replay window.
  • Credentials are encrypted at rest and never sent to the browser.
  • Provider retries are de-duplicated by message id, inbound text is capped at 2,000 characters, and webhooks are rate limited.
  • Email auto-replies and messages from the channel's own address are ignored to prevent reply loops.

Connecting each channel

Telegram

Create a bot with @BotFather and paste the bot token. The webhook is registered automatically.

WhatsApp, Messenger and Instagram

In your Meta app, set the callback URL to the channel's webhook URL and the verify token shown on the Channels page, then subscribe to messages. WhatsApp needs a permanent access token and phone number ID; Messenger needs a page access token and page ID; Instagram needs the page access token and the Instagram business account ID. All need the app secret for signature checks. WhatsApp only allows free-form replies within 24 hours of the customer's last message.

SMS (Twilio)

Paste the account SID, auth token and number, then set the number's A message comes in webhook to the channel's URL (HTTP POST).

Email (Mailgun)

Create a Mailgun route that forwards your support address to the channel's webhook URL, and paste the webhook signing key. Replies are sent through the platform mailer from that address.

Requirements

Replies are produced by queued jobs, so a queue worker must be running (or QUEUE_CONNECTION=sync for low volume).