Deployment cohorts

Create deployment cohort

POST
/workspaces/{workspaceId}/deployment-cohorts

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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

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

Response Body

application/json

application/problem+json

application/problem+json

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

Created deployment cohort.

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