Skip to main content

Messaging API

Kanalo offers a messaging API for server-initiated management of, and communication to, sockets and tags. This is for when the server wishes to manage or message sockets without responding to an incoming message with a command. However, when possible, it is preferable to use commands for such tasks, as they are faster and do not require an access token.

Authentication

Backends will need an API key in order to access the API. To create a key, go to the API Keys tab on the dashboard and click the "New Key" button at the top right and follow the prompt.

To access the API, send the private key value in the Authorization header with the format Bearer <API Key> (as if it were a JWT).

Endpoints

There is only one endpoint for the messaging API, detailed below.

PUT /commands

Accepts a list of commands to execute, similar to how they would normally be sent from a Function. This should be a JSON array with individual commands structured in the same format as described on the commands page. Every call has a data limit of 400kb.