Alerts

List alerts

POST
/workspaces/{workspaceId}/alerts/list

Authorization

API key Alerts: read
AuthorizationBearer <token>

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

In: header

Scope: Alerts: read

Path Parameters

workspaceId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

sortColumn?null||
ascending?null|boolean
limit?||
Match^-?(?:0|[1-9]\d*)$
Formatint32
cursor?null|string
filter?null|

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/workspaces/00000000-0000-0000-0000-000000000001/alerts/list" \  -H "Content-Type: application/json" \  -d '{    "sortColumn": "StartedAt",    "ascending": false,    "limit": 50,    "filter": {      "state": [        "Firing"      ],      "alertRuleId": [        "a7Kd93mQx2Lp"      ],      "startedAt": [        {          "from": "2026-01-12T00:00:00+00:00",          "to": "2026-01-13T00:00:00+00:00"        }      ],      "tag": {        "tagIds": [          "t8Pj42kLd6Nw"        ],        "mode": "ContainsAny"      }    }  }'

Page of alerts matching the filter.

{  "alerts": [    {      "id": "c6Hy71wPd3Mv",      "alertRuleId": "a7Kd93mQx2Lp",      "state": "Firing",      "thresholdType": "FixedHigherThan",      "thresholdValue": 90,      "startedAt": "2026-01-12T14:05:12+00:00",      "devices": [        {          "deviceId": "thermostat-0042",          "startedAt": "2026-01-12T14:05:12+00:00"        },        {          "deviceId": "thermostat-0117",          "startedAt": "2026-01-12T14:10:31+00:00",          "resolvedAt": "2026-01-12T14:40:02+00:00"        }      ],      "tagIds": [        "t8Pj42kLd6Nw"      ]    }  ],  "nextCursor": "eyJvZmZzZXQiOjUwfQ",  "hasMore": true}