Palbase Realtime · API
/realtime/channelsDeclare the channels
Replaces the project's channel declaration, in its order (100 at most). A pattern is ':'-separated segments; a {name} segment matches exactly one. owner: the pattern's one {name} must be the joining user, who may do everything on it. public: any signed-in user of the project subscribes, and may publish and read or write state as declared. A channel no pattern matches belongs to no one. roles:, flags:, messaging:, calls: and debug: are the platform's. Open sockets are decided again within a heartbeat.
Called by your server, with the project's secret key.
Request body
channelsobject[] · requiredThe channels, in the order they are matched.curl -X PUT "https://<your-ref>.palbase.studio/realtime/channels" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"channels":[{"kind":"owner","pattern":"string"}]}'Responses
200The declaration, in force
400The request is malformed: a field, a channel or a pattern is wrong
401No key, or not a key of this project, or a token that is not valid (the edge's answer)
403Not the project's secret key
429The project's request rate, its realtime quota for the period, or the connections it allows are used up; Retry-After says when to try again
503The platform could not answer now; retrying is safe (Retry-After)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation PutChannels of realtime's contract.