Sensorclouds
Integrations

Webhook Payload & Signatures

The JSON Sensorclouds sends to HTTP webhooks, the event types, and how to verify signatures

This page is for developers building an endpoint that receives Sensorclouds HTTP webhooks.

Request

ItemValue
MethodPOST
Content-Typeapplication/json; charset=utf-8
BodyJSON (see below)
HeadersX-SSC-Event, X-SSC-Delivery, plus X-SSC-Signature and X-SSC-Timestamp when a signing secret is set, and any custom headers you configured

Body

{
  "deliveryId": "b0c9f1d2-7a44-4c2e-9d0a-1f2e3d4c5b6a",
  "event": "ALARM",
  "severity": "CRITICAL",
  "tenantId": "3f2a…",
  "applicationId": "a91c…",
  "occurredAt": "2026-09-18T07:30:00.000Z",
  "title": "Alarm: Cold room above 8 °C",
  "message": "…",
  "data": {
    "alarmName": "Cold room above 8 °C",
    "deviceName": "Truck 12",
    "deviceId": "5d8e…",
    "applicationId": "a91c…"
  }
}
FieldDescription
deliveryIdUnique per delivery. Use it to ignore duplicates when a delivery is retried
eventThe event type (table below)
severityINFO, WARNING, or CRITICAL
tenantIdYour workspace ID
applicationIdThe application, or null for workspace-level events
occurredAtWhen the event happened (ISO 8601, UTC)
title, messageHuman-readable text, the same as the in-app notification
dataEvent-specific details (may include more keys than shown)

Event types

eventWhen
ALARMAn alarm rule fired
ALARM_RESOLVEDAn alarm cleared
DEVICE_ONLINEA device came online
DEVICE_OFFLINEA device went offline
DEVICE_ADDEDA device was registered
DEVICE_DELETEDA device was deleted
APPLICATION_CREATEDAn application was created
APPLICATION_DELETEDAn application was deleted
OTA_COMPLETEDAn OTA campaign finished, with at least one device updated
OTA_FAILEDAn OTA campaign finished, with no device updated successfully
USER_ADDEDA member joined the workspace
USER_REMOVEDA member was removed

Verifying signatures

When the integration has a signing secret, every request includes:

X-SSC-Timestamp: 1758180600000
X-SSC-Signature: t=1758180600000,v1=5f2b…c9

v1 is the HMAC-SHA256 (hex) of the string {t}.{raw request body}, keyed with your signing secret.

To verify:

Read t and v1 from X-SSC-Signature.

Build t + "." + rawBody, using the raw bytes you received rather than re-serialized JSON.

Compute HMAC-SHA256 with your secret and compare it to v1 in constant time.

Reject requests whose t (milliseconds) is more than a few minutes old, to block replays.

Node.js (Express)

const crypto = require('crypto');
const express = require('express');
const app = express();

app.post('/sensorclouds', express.raw({ type: 'application/json' }), (req, res) => {
  const header = req.get('X-SSC-Signature') || '';
  const parts = Object.fromEntries(header.split(',').map(p => p.split('=')));
  const expected = crypto.createHmac('sha256', process.env.SSC_SECRET)
    .update(`${parts.t}.${req.body.toString('utf8')}`)
    .digest('hex');

  const valid = parts.v1 && parts.v1.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected));
  const fresh = Math.abs(Date.now() - Number(parts.t)) < 5 * 60 * 1000;
  if (!valid || !fresh) return res.status(401).end();

  const event = JSON.parse(req.body);
  res.status(204).end();            // reply fast, then process
  console.log(event.event, event.title);
});

app.listen(3000);

Python (Flask)

import hashlib, hmac, os, time
from flask import Flask, request, abort

app = Flask(__name__)
SECRET = os.environ["SSC_SECRET"].encode()

@app.post("/sensorclouds")
def sensorclouds():
    parts = dict(p.split("=", 1) for p in request.headers.get("X-SSC-Signature", "").split(","))
    body = request.get_data()
    expected = hmac.new(SECRET, f"{parts.get('t')}.".encode() + body, hashlib.sha256).hexdigest()
    if not hmac.compare_digest(parts.get("v1", ""), expected):
        abort(401)
    if abs(time.time() * 1000 - int(parts["t"])) > 5 * 60 * 1000:
        abort(401)
    event = request.get_json()
    return "", 204

Delivery behavior

BehaviorDetail
SuccessAny 2xx response
RetriesFailed deliveries are retried up to the integration's Retries setting
TimeoutYour endpoint must reply within the integration's Timeout (1–30 s)
DuplicatesPossible after retries. De-duplicate with deliveryId
OrderNot guaranteed. Use occurredAt to order events

Next Steps

On this page