Appearance
Channels (Messaging Integrations)
Channels connect your Universal API agents to messaging platforms — Slack, Discord, Telegram, WhatsApp, and generic webhooks. Once configured, users on those platforms can chat with your agent directly.
How Channels Work
- Create a channel — Specify the platform, agent, and platform credentials
- Get a webhook URL — Universal API generates a unique inbound webhook
- Configure the platform — Point your bot's webhook to the URL
- Users chat — Messages flow in, agent responds, replies flow back
User (Slack/Discord/etc.) → Platform Webhook → Universal API → Agent → Response → PlatformSupported Platforms
| Platform | Auth Required | Group Support | Features |
|---|---|---|---|
| Slack | signingSecret + botToken | ✅ | Threads, mentions, allowlists |
| Discord | publicKey + botToken | ✅ | Threads, mentions, allowlists |
| Telegram | botToken | ✅ | Auto-registers webhook with Telegram API |
verifyToken + accessToken + phoneNumberId | ✅ | Meta webhook verification | |
| Twilio Voice | accountSid + authToken + phoneNumber | ❌ | Inbound + outbound phone calls |
| Webhook | secret (optional) | ❌ | Generic HTTP webhook with HMAC verification |
Quick Start
1. Create a Channel
bash
curl -X POST https://api.universalapi.co/channels \
-H "Authorization: Bearer uapi_ut_your_token" \
-H "Content-Type: application/json" \
-d '{
"name": "my-slack-bot",
"platform": "slack",
"agentId": "YOUR_AGENT_ID",
"platformConfig": {
"signingSecret": "your_slack_signing_secret",
"botToken": "xoxb-your-slack-bot-token"
}
}'The response includes a webhookUrl — configure this in your platform's bot settings.
2. Configure Your Platform
Slack: Go to your Slack App → Event Subscriptions → set the Request URL to the webhookUrl.
Discord: Go to your Discord App → General Information → set the Interactions Endpoint URL.
Telegram: The webhook is auto-registered when you create the channel — no manual setup needed!
WhatsApp: In Meta Business Suite → WhatsApp → Configuration → set the Callback URL.
3. Test It
bash
curl -X POST https://api.universalapi.co/channels/{channelId}/test \
-H "Authorization: Bearer uapi_ut_your_token" \
-H "Content-Type: application/json" \
-d '{"message": "Hello! Are you working?"}'Security Features
Platform Signature Verification
Every inbound webhook is verified using the platform's native signature mechanism:
- Slack: HMAC-SHA256 with signing secret
- Discord: Ed25519 signature verification
- Telegram: Secret token header validation
- WhatsApp: SHA256 HMAC verification
- Webhook: Optional HMAC with shared secret
Sender Allowlists
Restrict which users can interact with your agent:
json
{
"allowedSenders": ["U12345678", "U87654321"]
}Group Policies
Control how the agent behaves in group chats:
| Policy | Behavior |
|---|---|
disabled | Ignore all group messages (DMs only) |
allowlist | Only respond in specified groups |
open | Respond in all groups |
Mention Gating
Set requireMention: true to only respond when the bot is @mentioned in groups.
Conversation Continuity
Channels automatically map platform threads/groups/DMs to Universal API conversation IDs. This means:
- Multi-turn conversations work naturally
- Context is preserved within a thread
- Each DM or thread gets its own conversation
Auto-Pause
If a channel encounters 3 consecutive failures, it's automatically paused (status → error) to prevent runaway errors. Reactivate by updating the status:
bash
curl -X PUT https://api.universalapi.co/channels/{channelId} \
-H "Authorization: Bearer uapi_ut_your_token" \
-H "Content-Type: application/json" \
-d '{"status": "active"}'Billing
Channels use normal agent invocation credits — no additional channel charges. Each message that triggers an agent response costs the standard agent credits based on token usage.
Related Resources
- Channels API Reference — Full endpoint documentation
- Voice Agents — Twilio voice channel setup
- Creating Agents — Build the agent your channel connects to