Skip to content

Thing API

The Thing API manages persistent entities through four routes:

  • POST /thing/create
  • POST /thing/update
  • POST /thing/archive
  • POST /thing/delete
  • Request body must be JSON.
  • Unknown fields are rejected (strict parsing).
  • Authorization: Bearer <token> is required only when gateway auth is enabled.
FieldTypeRequiredNotes
channel_idstringYesTarget channel ID.
passwordstringYesChannel password, 8-128 chars.
op_idstringNoIdempotency key. If missing, gateway generates one and echoes it in response.
RouteHard required business fields
/thing/createobserved_at
/thing/updatething_id, observed_at
/thing/archivething_id, observed_at
/thing/deletething_id, observed_at
FieldTypeRequiredRules
thing_idstringUpdate/Archive/DeleteMust be omitted on create; generated by gateway on create.
titlestringNo (recommended on create)Product semantics recommend providing title on create; gateway currently does not reject missing title.
descriptionstringNoEmpty string is treated as absent.
tagsstring[]NoMax 32 items, each max 64 chars, deduplicated after trim.
primary_imagestringNoOptional URL, max 2048 chars.
imagesstring[]NoMax 32 items, each max 2048 chars, deduplicated after trim.
created_atnumberNoAllowed only on create; defaults to observed_at when absent.
deleted_atnumberNoAllowed only on delete; defaults to observed_at when absent.
external_idsobjectNoKey format: [A-Za-z0-9_:.\-], key <= 64; value must be string or null (null deletes key).
location_type + location_valuestring + stringPairMust appear together. location_type: `physical
observed_atnumberYesUnix seconds; used as occurred-at for this thing dispatch.
attrsobjectNoObject patch; null value means delete key. Arrays are rejected; nested object depth is one level.
metadataobjectNoScalar values only (string/number/bool), key <= 64, value <= 512.
Terminal window
curl -X POST https://gateway.pushgo.dev/thing/create \
-H "Content-Type: application/json" \
-d '{
"channel_id": "06J0FZG1Y8XGG14VTQ4Y3G10MR",
"password": "pass-1234",
"title": "Living Room Thermometer",
"observed_at": 1713750000,
"tags": ["sensor", "temperature"],
"attrs": { "temperature": 22.5 }
}'
{
"success": true,
"data": {
"channel_id": "06J0FZG1Y8XGG14VTQ4Y3G10MR",
"op_id": "op-20260422-001",
"thing_id": "8a1fc4b3d9f04fd2857f92f66f7cc5d1",
"accepted": true
},
"error": null,
"error_code": null
}