Skip to main content

Sending Data

info

When making a request to the TagoIO API, you must also specify the appropriate regional endpoint. Check out the available regions here: API documentation

:::tip Looking for a lighter protocol? TagoTiP lets you send the same data in ~130 bytes instead of ~487 - no JSON, no HTTP headers. Ideal for constrained devices. See TagoTiP over HTTP for the HTTP transport. :::

A device can send data to TagoIO by using the POST method.

POST https://api.<region>.tago.io/data

Request fields

KeyTypeRequiredvariablestring (max 100 characters)yesunitstring (max 25 characters)novaluestring / number / boolean (max 6kB)notimestringnogroupstring (max 100 characters)no / autolocationobject | geoJSONnometadataobject (max 10kB)no

You must include a Device-Token to authorize the operation. Learn more about the fields necessary to send data to TagoIO, including the Header and other formats: fields necessary.

Location field

The location field accepts two formats:

GeoJSON Point:

{ "type": "Point", "coordinates": [-85.628292, 42.2974279] }

LatLng literal:

{ "lat": 42.2974279, "lng": -85.628292 }

Both are valid at ingestion time. TagoIO normalizes all location data to GeoJSON before storing it, so what you read back will always be { "type": "Point", "coordinates": [...] }.

caution

GeoJSON uses [longitude, latitude] order, not the common lat/lng convention. Double-check your coordinate order when using the GeoJSON format.

Notes and restrictions

Example payload:

{
"variable": "temperature",
"unit": "F",
"value": 55,
"time": "2015-11-03 13:44:33",
"location": { "lat": 42.2974279, "lng": -85.628292 }
}