Skip to content

Thing API

The Thing API allows you to manage persistent entities like physical devices, rooms, or logical tasks. Unlike Events, Things have a long-term state and can hold static attributes.

ActionMethodPath
CreatePOST/v1/channel/{channel_id}/thing/create
UpdatePOST/v1/channel/{channel_id}/thing/update
ArchivePOST/v1/channel/{channel_id}/thing/archive
DeletePOST/v1/channel/{channel_id}/thing/delete

HeaderValueDescription
Content-Typeapplication/jsonAlways required.
AuthorizationBearer <token>Your secret gateway token.

FieldTypeRequiredDescription
passwordstringYesChannel password (8-128 chars).
thing_idstringNo*Unique ID for the thing. Required for Update, Archive, and Delete.
thing_typestringYesA category (e.g., thermometer, web_server).
stateenumNoACTIVE, INACTIVE, DECOMMISSIONED.
attrsobjectNoA JSON object containing current attributes (e.g., { "firmware": "1.0.2" }).

Initialize a new persistent entity.

Terminal window
curl -X POST https://api.pushgo.io/v1/channel/ABC123XYZ/thing/create \
-H "Content-Type: application/json" \
-d '{
"password": "your_password",
"thing_id": "living_room_temp",
"thing_type": "sensor",
"state": "ACTIVE",
"attrs": { "location": "Floor 1" }
}'

Modify attributes or the state of an existing thing. Attributes are merged.

Terminal window
curl -X POST https://api.pushgo.io/v1/channel/ABC123XYZ/thing/update \
-H "Content-Type: application/json" \
-d '{
"password": "your_password",
"thing_id": "living_room_temp",
"attrs": { "temperature": 22.5, "humidity": 45 }
}'
  • Archive: Keeps the data but hides it from the main view in the app.
  • Delete: Permanently removes the thing and its history.
Terminal window
curl -X POST https://api.pushgo.io/v1/channel/ABC123XYZ/thing/archive \
-H "Content-Type: application/json" \
-d '{
"password": "your_password",
"thing_id": "living_room_temp"
}'

Successful requests return the thing_id:

{
"thing_id": "living_room_temp"
}