Skip to content

Thing API

The Thing API represents long-lived objects that change over time, such as servers, rooms, sensors, network services, or long-running tasks. Creating a Thing returns a thing_id; updates, archive, and delete calls use that ID.

POST /thing/create
POST /thing/update
POST /thing/archive
POST /thing/delete

The request body must be JSON, and unknown fields are rejected. If a private Gateway enables PUSHGO_TOKEN, include Authorization: Bearer <token>.

HeaderRequiredDescription
Content-Type: application/jsonYesRequest body format.
Authorization: Bearer <token>Gateway-dependentRequired only when a private Gateway enables PUSHGO_TOKEN.
/thing/create -> thing_id
|
+-> /thing/update can be called many times
|
+-> /thing/archive inactive but history remains
|
+-> /thing/delete removed or retired
FieldTypeRequiredDescription
channel_idstringYesTarget channel ID.
passwordstringYesChannel password, usually 8-128 characters.
op_idstringNoIdempotency key; generated and returned if omitted.
ciphertextstringNoOptional E2EE ciphertext payload.
RouteRequired business fields
/thing/createobserved_at
/thing/updatething_id, observed_at
/thing/archivething_id, observed_at
/thing/deletething_id, observed_at
FieldTypeRules
thing_idstringRequired for update, archive, and delete; must not be sent on create; 1-64 chars, letters/digits/_/:/-.
titlestringRecommended on create; the Gateway currently does not reject missing title.
descriptionstringOptional; empty strings are treated as missing.
tagsstring[]Up to 32 items, max 64 chars each, trimmed and deduplicated.
primary_imagestringOptional URL, max 2048 chars.
imagesstring[]Up to 32 image URLs, max 2048 chars each.
created_atnumberCreate only; falls back to observed_at when omitted.
deleted_atnumberDelete only; falls back to observed_at when omitted.
observed_atnumberRequired; observation time for this state update; Unix seconds or milliseconds accepted and normalized to milliseconds.
external_idsobjectKey pattern [A-Za-z0-9_:.-], key <= 64 and lowercased; value is non-empty string <= 256 or null to remove.
location_type + location_valuestring + stringMust appear together; type is physical, geo, cloud, datacenter, or logical. Formats: geo is lat,lng, cloud is provider:region[:zone], datacenter is site[:room[:rack]], logical is slash-separated tokens.
attrsobjectObject patch; null removes a key; arrays are not allowed; only one nested object level.
metadataobjectNo
Terminal window
curl -X POST https://gateway.pushgo.dev/thing/create \
-H "Content-Type: application/json" \
-d '{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"title": "Home NAS",
"description": "Primary storage in the living room rack",
"observed_at": 1713750000000,
"tags": ["nas", "home"],
"location_type": "physical",
"location_value": "home/living-room",
"attrs": {
"online": true,
"disk_used": 0.72,
"temperature": 43.2
}
}'

Response:

{
"success": true,
"data": {
"channel_id": "YOUR_CHANNEL_ID",
"op_id": "op-20260422-001",
"thing_id": "8a1fc4b3d9f04fd2857f92f66f7cc5d1",
"accepted": true
},
"error": null,
"error_code": null
}

Save the returned thing_id; update, archive, and delete calls need it.

Terminal window
curl -X POST https://gateway.pushgo.dev/thing/update \
-H "Content-Type: application/json" \
-d '{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"thing_id": "8a1fc4b3d9f04fd2857f92f66f7cc5d1",
"observed_at": 1713750600000,
"attrs": {
"disk_used": 0.74,
"temperature": 44.1
}
}'

attrs is a patch. You do not need to send full state every time. To remove a key, pass null.

{
"attrs": {
"temporary_alarm": null
}
}

Archive is for objects that are no longer active but should keep history.

Terminal window
curl -X POST https://gateway.pushgo.dev/thing/archive \
-H "Content-Type: application/json" \
-d '{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"thing_id": "8a1fc4b3d9f04fd2857f92f66f7cc5d1",
"observed_at": 1713751200000,
"attrs": {
"online": false
}
}'

Use /thing/delete when an object is removed or retired.

Terminal window
curl -X POST https://gateway.pushgo.dev/thing/delete \
-H "Content-Type: application/json" \
-d '{
"channel_id": "YOUR_CHANNEL_ID",
"password": "YOUR_CHANNEL_PASSWORD",
"thing_id": "8a1fc4b3d9f04fd2857f92f66f7cc5d1",
"observed_at": 1713751800000,
"deleted_at": 1713751800000
}'

Thing represents a persistent object. Related alerts can use Message with thing_id; related processes can use Event with thing_id.

ScenarioModel
Current NAS CPU, temperature, disk usageThing
One disk warning on the NASMessage + thing_id
NAS backup from start to completionEvent + thing_id

Thing APIs use the shared response envelope. accepted=true means the Gateway entered dispatch, not that every device has displayed a system notification.

StatusTypical reason
400Missing observed_at, unknown field, invalid attrs or external_ids.
401Private Gateway Bearer token missing or wrong.
404Channel or thing_id does not exist.
413Request body exceeds 32KB.
503Dispatch did not fully succeed.