Pusher: API Design โ Channels & Events
Docs-backedChannels REST API: POST /apps/{app_id}/events to trigger an event on a channel. The data model is simple: apps contain channels, events are published to channels. Channel naming conventions: public channels (any name), private channels (private-prefix), presence channels (presence-prefix), and encrypted channels (private-encrypted-prefix). Batch events: POST /apps/{app_id}/batch_events sends multiple events in one request. Channel info: GET /apps/{app_id}/channels returns occupied channels. Presence data: GET /apps/{app_id}/channels/{channel}/users returns online users. Webhook endpoints receive connection and channel events. The API is purposefully simple โ agents trigger events, clients subscribe. The Channels protocol handles WebSocket lifecycle management automatically.