Deployment cohorts

Add devices to deployment cohort

POST
/workspaces/{workspaceId}/deployment-cohorts/{deploymentCohortId}/devices/add

Authorization

API key Deployments: write
AuthorizationBearer <token>

API key (sf_...) with any of the required scopes. Generate it in the Spotflow portal on the settings page.

In: header

Scope: Deployments: write

Path Parameters

workspaceId*string
Formatuuid
deploymentCohortId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

deviceIds?null|array<string>
filter?null|

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/workspaces/00000000-0000-0000-0000-000000000001/deployment-cohorts/m3Yg84tDx7Rn/devices/add" \  -H "Content-Type: application/json" \  -d '{    "deviceIds": [      "thermostat-0231"    ],    "filter": {      "deviceId": [        {          "contains": "thermostat"        }      ],      "tags": [        {          "tagName": "environment",          "equals": "field-test"        }      ]    }  }'

Deployment cohort the devices were added to.

{  "id": "m3Yg84tDx7Rn",  "name": "Field test devices",  "createdAt": "2026-01-07T10:00:00+00:00"}