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
| Item | Value |
|---|---|
| Method | POST |
| Content-Type | application/json; charset=utf-8 |
| Body | JSON (see below) |
| Headers | X-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…"
}
}| Field | Description |
|---|---|
deliveryId | Unique per delivery. Use it to ignore duplicates when a delivery is retried |
event | The event type (table below) |
severity | INFO, WARNING, or CRITICAL |
tenantId | Your workspace ID |
applicationId | The application, or null for workspace-level events |
occurredAt | When the event happened (ISO 8601, UTC) |
title, message | Human-readable text, the same as the in-app notification |
data | Event-specific details (may include more keys than shown) |
Event types
event | When |
|---|---|
ALARM | An alarm rule fired |
ALARM_RESOLVED | An alarm cleared |
DEVICE_ONLINE | A device came online |
DEVICE_OFFLINE | A device went offline |
DEVICE_ADDED | A device was registered |
DEVICE_DELETED | A device was deleted |
APPLICATION_CREATED | An application was created |
APPLICATION_DELETED | An application was deleted |
OTA_COMPLETED | An OTA campaign finished, with at least one device updated |
OTA_FAILED | An OTA campaign finished, with no device updated successfully |
USER_ADDED | A member joined the workspace |
USER_REMOVED | A 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…c9v1 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 "", 204Delivery behavior
| Behavior | Detail |
|---|---|
| Success | Any 2xx response |
| Retries | Failed deliveries are retried up to the integration's Retries setting |
| Timeout | Your endpoint must reply within the integration's Timeout (1–30 s) |
| Duplicates | Possible after retries. De-duplicate with deliveryId |
| Order | Not guaranteed. Use occurredAt to order events |