Webhook API Format
Technical reference for the PEEK webhook ingest endpoint.
Endpoint
POST https://peekiot.com/ingest/{webhook_secret}The webhook_secret is a UUID generated when you create the webhook source. It acts as authentication — only requests sent to the correct URL are accepted.
Request Format
| Header | Value |
|---|---|
| Content-Type | application/json |
The request body must be valid JSON. The maximum payload size accepted is 100KB.
Device Identification
PEEK looks for a device identifier in the payload using these fields, checked in order:
| Field | Convention |
|---|---|
| deviceId | Generic / PEEK default |
| device_id | Snake case variant |
| thingName | AWS IoT Core |
| deviceName | Azure IoT Hub |
Optional Metadata Fields
PEEK also recognizes these optional fields for additional context:
| Field | Purpose |
|---|---|
| timestamp | Unix timestamp of the message |
| messageType / type / event | Message type classification |
| topic | Optional topic/channel identifier |
| firmware / firmware_version | Device firmware version |
Example Payloads
Simple Telemetry
{
"deviceId": "sensor-001",
"temperature": 22.5,
"humidity": 48,
"battery": 87
}With Message Type
{
"deviceId": "sensor-001",
"messageType": "telemetry",
"timestamp": 1708200000,
"data": {
"temperature": 22.5,
"humidity": 48
}
}AWS IoT Format
{
"thingName": "factory-sensor-12",
"timestamp": 1708200000,
"temperature": 45.2,
"pressure": 1013.25
}Response Codes
| Code | Meaning |
|---|---|
| 200 | Message accepted and queued for processing |
| 400 | Invalid JSON or missing device identifier |
| 404 | Unknown webhook secret — no source found |
| 503 | Queue full — try again shortly |