Skip to main content


Hivekit supports connections via HTTP, WebSocket, and raw TCP (and we intend to add additional protocols such as MQTT soon). The preferred way to interact with Hivekit is via a client SDK - but if you wish to give the raw protocol a go, here's how:


POST an array of actions (see protocol structure) to Include your API token as an Authorization: Bearer YOUR_TOKEN header. E.g. via curl:

curl -X POST \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '[{"typ":"obj","act":"lis","rea":"my-realm-id-123"}]'

or NodeJS

    const needle = require('needle');
const options = {
json: true,
headers: {
'Authorization': `Bearer ${token}`
const data = [{"typ":"obj","act":"lis","rea":"realm-a-f7k1a0mpvko-4rnv5psdle8"}];
const response = await needle('post', '', data, options);


To establish a Websocket connection, connect to wss:// and send the string Bearer YOUR_TOKEN before sending any other message. If your authentication was succesfull, you should receive a message like this:

"typ":"sys", // type = system
"act":"aut", // action = authenticate
"res":"suc", // result = success
"version": "0.12.3", // server version
"buildDate": "30 Mar 2023 19:54:46" // server build date

Once you received this message, you can start sending regular arrays of actions (see protocol structure). Here's a JavaScript example that uses the Websocket client built into browsers:

const ws = new WebSocket('wss://')
ws.on('open', () => {
ws.send('Bearer YOUR_API_TOKEN');
ws.on('message', msgBuffer => {
JSON.parse(msgBuffer.toString()).forEach(msg => {
if (msg.typ == 'sys' && msg.act == 'aut' && msg.res == 'suc') {
// hurray, we're connected and authenticated. Time to start sending messages


You can also talk to Hivekit using a raw TCP socket. To do so, connect to with a TCP client of your choice. From here on, it works the same as the Websocket connection described above (send Auth Message, wait for response, then start sending action arrays).