Server-side API

HTTP API for publishing events, querying channels, and managing connections from your backend.

Base URL

Managed platform: https://realtime.summonflow.com

Self-hosted: your socket server URL.

Authentication

All server API requests require a publish token in the Authorization header:

Authorization: Bearer <publish_token>

Endpoints

Publish Event

POST /apps/:key/events

// Body
{
"channel": "public-notifications",
"event": "new-alert",
"data": { ... },
"socketId": "optional-exclude-sender"
}

Broadcasts the event to all subscribers on the channel. Pass socketId to exclude the sender.

List Channels

GET /apps/:key/channels

// Response
{
"channels": [
{ "name": "public-lobby", "subscription_count": 42, "occupied": true },
]
}

Channel Info

GET /apps/:key/channels/:channelName

// Response
{
"name": "presence-room-1",
"subscription_count": 7,
"occupied": true,
"user_count": 7
}

Presence Users

GET /apps/:key/channels/:channelName/users

// Response
{
"users": [
{ "id": "user-1", "info": { "name": "Alice" } },
]
}

Only available for presence channels.

Error Responses

StatusMeaning
401Missing or invalid publish token
404App key not found or channel does not exist
400Invalid request body