Device tags
Upsert device tags
Authorization
API key Devices: writeAuthorizationBearer <token>
API key (sf_...) with any of the required scopes. Generate it in the Spotflow portal on the settings page.
In: header
Scope: Devices: write
Path Parameters
workspaceId*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
deviceIds?null|array<string>
filter?null|
tags*
Response Body
application/json
application/problem+json
curl -X POST "https://example.com/workspaces/00000000-0000-0000-0000-000000000001/devices/upsert-tags" \ -H "Content-Type: application/json" \ -d '{ "deviceIds": [ "thermostat-0042", "thermostat-0117" ], "filter": { "deviceId": [ { "contains": "thermostat" } ] }, "tags": { "environment": "field-test", "region": "eu-west" } }'Number of devices whose tags changed.
{ "devicesUpdated": 24}