Tempivo Help
REST API

Assets

Devices and sensors

REST API-översikt

GET
/assets

List devices in your organization. Paginate with cursor / nextCursor.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token with your API key. Example: Bearer sk_live_xxx

In: header

Query Parameters

limit?integer

Max items per page

cursor?string

Last asset's id from the previous page: the same value returned as nextCursor (pass verbatim).

model?string

Optional filter by sensor product line (alias: model-name).

model-name?string

Deprecated alias for model query param.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/assets"
{
  "items": [
    {
      "id": "asset-123",
      "recType": "asset",
      "name": "Unit 0042",
      "serialNumber": "DEVICE-123456789012",
      "status": "online",
      "signalStrength": "good",
      "batteryStatus": "ok",
      "model": "TVO-THT",
      "lastReadingAt": "2026-03-17T10:00:00.000Z"
    }
  ],
  "totalItems": 1,
  "nextCursor": "asset-123"
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}
POST
/assets

Register a device (unique serialNumber among active assets). For integrator accounts, serialNumber and optional name are enough.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token with your API key. Example: Bearer sk_live_xxx

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Register a device in your org. Cellular / integrator: omit buildingId when the org has a default building; use waterType automatic and floor 0 for a flat device list. Full REST (property): set buildingId (and optionally spaceId or floor) for building/room placement.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/assets" \  -H "Content-Type: application/json" \  -d '{    "serialNumber": "DEVICE-123456789012",    "name": "Unit 0042",    "waterType": "automatic",    "floor": 0,    "model": "TVO-THT"  }'
{
  "id": "string"
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}
GET
/assets/{assetId}

Retrieve one device by asset ID. Same API key as config profiles.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token with your API key. Example: Bearer sk_live_xxx

In: header

Path Parameters

assetId*string

Response Body

application/json

application/json

curl -X GET "https://example.com/assets/string"
{
  "id": "asset-123",
  "recType": "asset",
  "name": "Unit 0042",
  "serialNumber": "DEVICE-123456789012",
  "status": "online",
  "signalStrength": "good",
  "batteryStatus": "ok",
  "model": "TVO-THT",
  "lastReadingAt": "2026-03-17T10:00:00.000Z"
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}
DELETE
/assets/{assetId}

Remove a device from your org (soft-delete: statusarchived, assignments cleared). It disappears from list/get; measurement history is kept. No public restore — contact support if needed. Same API key as config profiles.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token with your API key. Example: Bearer sk_live_xxx

In: header

Path Parameters

assetId*string

Response Body

application/json

application/json

curl -X DELETE "https://example.com/assets/string"
{
  "deleted": true
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}
POST
/assets/{assetId}/replace-hardware

Replace the physical device for an asset: set a new serial number and append the previous one to replacement history. All existing data (history, config, alerts) is kept. Cellular API organizations may use their API key here without the API integrations add-on (same key as config profiles).

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Bearer token with your API key. Example: Bearer sk_live_xxx

In: header

Path Parameters

assetId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/assets/string/replace-hardware" \  -H "Content-Type: application/json" \  -d '{    "newSerialNumber": "DEVICE-987654321098"  }'
{
  "success": true,
  "serialNumber": "string"
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}
{
  "success": false,
  "message": "Invalid or inactive API key"
}

Var den här guiden bra?