RESTful API to integrate KSP Cloud with your applications. Real-time device data, alerts, and analytics.
Generate an API key from your dashboard at Dashboard → Settings → API Keys
API_KEY: ksp_live_1a2b3c4d5e6f7g8h9i0jInclude your API key in the Authorization header of every request:
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://api.ksp-cloud.com/v1/devicesFetch the list of your devices:
// Response
{
"devices": [
{
"id": "deltax_001",
"name": "Cold Storage Room 1",
"type": "DeltaX Pro",
"status": "online",
"last_seen": "2025-12-07T10:30:00Z"
}
],
"total": 1
}/v1/devicesList all devices in your account
/v1/devices/{id}Get details of a specific device
/v1/devices/{id}/dataGet latest sensor readings
/v1/devices/{id}/historyGet historical data with filtering
/v1/devices/{id}/alertsConfigure temperature alerts
/v1/devices/{id}Update device settings
Retrieve the latest temperature and sensor readings from a specific device.
GET /v1/devices/deltax_001/data Authorization: Bearer ksp_live_1a2b3c4d5e6f7g8h9i0j
{
"device_id": "deltax_001",
"device_name": "Cold Storage Room 1",
"timestamp": "2025-12-07T10:30:00Z",
"readings": {
"temperature": 4.2,
"humidity": 65,
"battery": 87
},
"sensors": [
{
"id": "sensor_1",
"location": "top_left",
"temperature": 4.1
},
{
"id": "sensor_2",
"location": "bottom_right",
"temperature": 4.3
}
],
"status": "ok"
}Query historical temperature data with time range and interval filters.
GET /v1/devices/deltax_001/history?start=2025-12-01&end=2025-12-07&interval=1h Authorization: Bearer ksp_live_1a2b3c4d5e6f7g8h9i0j
| Parameter | Type | Description |
|---|---|---|
| start | ISO 8601 | Start date/time (required) |
| end | ISO 8601 | End date/time (required) |
| interval | string | Data aggregation: 5m, 15m, 1h, 6h, 1d |
{
"device_id": "deltax_001",
"start": "2025-12-01T00:00:00Z",
"end": "2025-12-07T23:59:59Z",
"interval": "1h",
"data": [
{
"timestamp": "2025-12-01T00:00:00Z",
"avg_temperature": 4.5,
"min_temperature": 4.0,
"max_temperature": 5.2,
"avg_humidity": 63
},
// ... more data points
],
"total_points": 168
}Set up automated alerts via WhatsApp, email, or SMS when temperature thresholds are exceeded.
POST /v1/devices/deltax_001/alerts
Authorization: Bearer ksp_live_1a2b3c4d5e6f7g8h9i0j
Content-Type: application/json
{
"name": "Cold Storage Alert",
"enabled": true,
"conditions": {
"min_temperature": 2.0,
"max_temperature": 8.0,
"duration": 300
},
"notifications": {
"whatsapp": {
"enabled": true,
"phone": "+919550421866"
},
"email": {
"enabled": true,
"address": "alerts@example.com"
}
}
}{
"alert_id": "alert_abc123",
"status": "created",
"message": "Alert configured successfully"
}The API uses standard HTTP status codes. All error responses include a JSON body with error details:
{
"error": "invalid_request",
"message": "Missing required parameter: device_id"
}{
"error": "unauthorized",
"message": "Invalid or expired API key"
}{
"error": "rate_limit_exceeded",
"message": "Too many requests. Limit: 100/min",
"retry_after": 60
}| Plan | Requests/Minute | Daily Limit |
|---|---|---|
| Free | 60 | 10,000 |
| Student | 100 | 50,000 |
| Pro | 300 | 500,000 |
| Enterprise | Custom | Unlimited |
Use our official SDKs for faster integration in your favorite language
Browse SDKs & Libraries