Skip to content

Ingest payload schema

The JSON body a device or stream sends, field by field, with the limits the ingest service enforces.

A device or a stream sends its readings as one JSON body per request. This page lists every field the ingest service accepts, and the limits it enforces on each one.

Device payload#

Device reading payload
FieldTypeRequiredDescription
timestampstringNoISO 8601. Defaults to the time of arrival. Must be within one hour of now.
dataobjectYesKeys map to the device type's metric names or custom keys. Values are number, string or boolean.
metadataobjectNoFree-form. Not used for alerts or charts.
statusonline | offline | errorNoThe device reporting its own state. Omit it unless the device knows something the reading does not show.

Stream payload#

Same as a device payload without status. A stream never reports online, offline or error.

Stream reading payload
FieldTypeRequiredDescription
timestampstringNoISO 8601. Defaults to the time of arrival.
dataobjectYesKeys map to the stream's own field definitions, set when the stream was created. This is not the device type metric registry.
metadataobjectNoFree-form. Not used for alerts or charts.

Limits#

These bound the whole payload, whether a key is a declared field or a custom one.

Transport payload limits
LimitValueDescription
data keys100Maximum number of keys in the data object.
key length100Maximum characters in any data or metadata key.
string value length1000Maximum characters in a string value.
metadata keys50Maximum number of keys in the metadata object.
metadata size16 KBMaximum serialised size of the metadata object.
nesting depth32Maximum object nesting Logable walks before it rejects the payload.

A custom key is any key in data that the device type does not declare. Custom keys have their own, tighter limits. These limits apply to devices only. A stream has no declared field set to compare against, so every key in a stream payload is checked against the payload limits above and nothing else.

Custom key limits
LimitValueDescription
custom keys20Maximum number of custom (unregistered) keys in one payload.
key length64Maximum characters in a custom key.
string value length256Maximum characters in a custom key's string value.

Example#

# Raw Meal Silo - Quick Test (curl)
# Device Type: silo | Device ID: <DEVICE_ID>
#
# The "data" fields shown are this device type's registered metrics.
# Optionally add your OWN custom fields to "data" (e.g. "totalizer": 1284300.0).
# Custom keys: start with a letter; letters/digits/underscores; max 64 chars.
# Up to 20 custom fields; values: number, string (max 256 chars) or boolean.
# Custom values appear on dashboards via a widget's "Show Custom Data" option.

curl -X POST "https://ingest.logable.app/ingest/<DEVICE_ID>" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <DEVICE_TOKEN>" \
  -d '{"timestamp":"2026-07-01T10:00:00.000Z","status":"online","data":{"weight":18750.5,"status":"filling"}}'

Keys that are rejected#

A key named __proto__, constructor or prototype, at any depth in data or metadata, is rejected. These names can corrupt a JavaScript object's prototype, so the ingest service refuses them outright.

Search the docs

Find a guide, an integration page, or a device type.