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

HeaderValue
Content-Typeapplication/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:

FieldConvention
deviceIdGeneric / PEEK default
device_idSnake case variant
thingNameAWS IoT Core
deviceNameAzure IoT Hub

Optional Metadata Fields

PEEK also recognizes these optional fields for additional context:

FieldPurpose
timestampUnix timestamp of the message
messageType / type / eventMessage type classification
topicOptional topic/channel identifier
firmware / firmware_versionDevice 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

CodeMeaning
200Message accepted and queued for processing
400Invalid JSON or missing device identifier
404Unknown webhook secret — no source found
503Queue full — try again shortly