Channels API
Base path: /api/channels
All endpoints require authentication. See API Overview for auth details.
Supported platforms: discord, telegram, slack, whatsapp, teams, google_chat
Platforms
Section titled “Platforms”List platforms
Section titled “List platforms”GET /api/channelsResponse:
{ "platforms": [ { "id": "slack", "name": "Slack", "credentials_stored": true, "status": "connected", "bound_agent": "agent_123", "binding_count": 3, "credentials_preview": "bot_token: xoxb-****-1234" }, { "id": "discord", "name": "Discord", "credentials_stored": false, "status": "not_configured", "bound_agent": null, "binding_count": 0, "credentials_preview": null } ]}Platform statuses: connected, not_configured, error
Get platform details
Section titled “Get platform details”GET /api/channels/{platform}Store credentials
Section titled “Store credentials”POST /api/channels/{platform}/credentialsRequired credential fields by platform:
| Platform | Fields |
|---|---|
discord | bot_token, public_key, application_id |
telegram | bot_token, webhook_secret |
slack | signing_secret, bot_token, socket_mode (optional bool) |
whatsapp | phone_number_id, access_token |
teams | app_id, app_password |
google_chat | service_account_json (full JSON string) |
Example (Slack):
{ "signing_secret": "abc123...", "bot_token": "xoxb-...", "socket_mode": false}Response:
{"preview": "signing_secret: abc1****3456; bot_token: xoxb-****-1234"}Credentials are encrypted at rest using Fernet with PBKDF2-HMAC-SHA256 (600,000 iterations).
Delete credentials
Section titled “Delete credentials”DELETE /api/channels/{platform}/credentialsTest a channel
Section titled “Test a channel”POST /api/channels/{platform}/testTests the channel connection with the stored credentials.
Bindings
Section titled “Bindings”A binding maps a platform channel to a Snippbot agent.
List bindings
Section titled “List bindings”GET /api/channels/bindingsQuery: platform
Response:
{ "bindings": [ { "id": "bind_abc123", "platform": "slack", "channel_id": "C0123456789", "channel_name": "#engineering", "agent_id": "agent_123", "access_mode": "open", "enabled": true, "created_at": "2026-01-01T00:00:00Z" } ]}Create a binding
Section titled “Create a binding”POST /api/channels/bindings{ "platform": "slack", "channel_id": "C0123456789", "channel_name": "#engineering", "agent_id": "agent_123", "access_mode": "open"}Access modes:
open— any user in the channel can interactallowlist— only approved usersadmin_only— only users with admin role in the binding
Returns 201 with the binding object.
Update a binding
Section titled “Update a binding”PUT /api/channels/bindings/{id}{"access_mode": "allowlist", "enabled": false}Delete a binding
Section titled “Delete a binding”DELETE /api/channels/bindings/{id}Access control
Section titled “Access control”Manage which users are allowed to interact with a bound agent.
List access rules
Section titled “List access rules”GET /api/channels/accessAdd a user
Section titled “Add a user”POST /api/channels/access{ "platform_user_id": "U0123456789", "role": "user"}Roles: user, admin
Remove a user
Section titled “Remove a user”DELETE /api/channels/access/{id}Channel server management
Section titled “Channel server management”Get channel server status
Section titled “Get channel server status”GET /api/channels/server/statusResponse:
{ "running": true, "pid": 12345, "uptime_seconds": 86400, "connected_platforms": ["slack", "telegram"], "messages_received": 1247, "messages_sent": 1189}Start the channel server
Section titled “Start the channel server”POST /api/channels/server/startStarts the channel server subprocess (equivalent to snippbot channel start).
Stop the server
Section titled “Stop the server”POST /api/channels/server/stopChannel settings
Section titled “Channel settings”GET /api/channels/settingsPUT /api/channels/settingsResponse:
{ "adapter_port": 18790, "rate_limit_per_minute": 30, "rate_limit_per_hour": 500, "proactive_enabled": false, "quiet_hours_start": "22:00", "quiet_hours_end": "08:00", "max_proactive_per_hour": 5, "public_url": "https://snippbot.example.com"}