SDM API & Webhook Integrations
Connect your applications with real-time IoT webhooks and RESTful device control endpoints.
Configure your HTTPS webhook URL, event category, and optional secret key.
When your device reports Control or Sensor data updates, SDM automatically queues a webhook.
Dispatched via HTTP POST with JSON payload and Bearer Authorization header.
Track HTTP responses and retry failed deliveries from Webhook Logs.
Supported Event Categories
| ID | Category | Events |
|---|---|---|
0 |
All Events (Control & Sensor) | type: "update" (all Control & Sensor updates) |
2 |
Sensor Telemetry | type: "update" (data.sensors array with value) |
4 |
Control State Changed (Relay/RGB) | type: "update" (data.controls array with value) |
Sample Webhook Payload
// Control state update (type = "update")
{
"type": "update",
"controls": [
{
"hid": "relay1",
"type": "OnOff",
"value": 1
}
]
}
// Sensor telemetry update (type = "update")
{
"type": "update",
"sensors": [
{
"hid": "temp1",
"type": "Temperature",
"value": 28.5
}
]
}
Control IoT Devices
POST
https://app.jisecure.com//api/external/control/{DEVICE_ID}
curl -X POST \
"https://app.jisecure.com//api/external/control/{DEVICE_ID}" \
-H "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"hid": "relay1", "value": 1, "delay": 20}'
import requests
url = "https://app.jisecure.com//api/external/control/{DEVICE_ID}"
headers = {"Authorization": "Bearer {YOUR_ACCESS_TOKEN}"}
res = requests.post(url, json={"hid": "relay1", "value": 1, "delay": 20}, headers=headers)
print(res.json())
<?php
$ch = curl_init("https://app.jisecure.com//api/external/control/{DEVICE_ID}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["hid" => "relay1", "value" => 1, "delay" => 20]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {YOUR_ACCESS_TOKEN}",
"Content-Type: application/json"
]);
echo curl_exec($ch);
Toggle IoT Devices
POST
https://app.jisecure.com//api/external/toggle/{DEVICE_ID}
curl -X POST \
"https://app.jisecure.com//api/external/toggle/{DEVICE_ID}" \
-H "Authorization: Bearer {YOUR_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"hid": "relay1"}'
Get Device Details
GET
https://app.jisecure.com//api/external/device/{DEVICE_ID}
curl -X GET \
"https://app.jisecure.com//api/external/device/{DEVICE_ID}" \
-H "Authorization: Bearer {YOUR_ACCESS_TOKEN}"