Skip to content

Alerts

The /v1/alerts endpoint on the Public API covers every rule on your account, whether you built it yourself in Dashboard → Automation or it was created automatically when you applied a device template or claimed a SiliconWit Module with recommended alerts attached. See Alerts for the full endpoint reference: GET /v1/alerts, GET /v1/alerts/:id, GET /v1/alerts/:id/history, POST /v1/alerts, PUT /v1/alerts/:id, and DELETE /v1/alerts/:id.

Creating and editing rules through the API applies the exact same validation as the dashboard (plan limits, self-loop prevention, phone verification for SMS actions, and so on), since both write through the same underlying system.

Through the dashboard:

  1. Go to Dashboard → Automation
  2. Click Create Rule (or apply a device template that includes starter alerts when adding a new device)
  3. Set your condition, actions, and cooldown
  4. Save the rule

Or through the API, useful for managing rules across a fleet from your own scripts or backend rather than clicking through each one:

Terminal window
curl -X POST https://api.siliconwit.io/v1/alerts \
-H "Authorization: Bearer swk_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "High Temperature",
"device_id": "dev_a1b2c3d4",
"trigger_config": {"conditions": [{"field": "temperature", "operator": ">", "value": 40}], "logic": "all"},
"actions": [{"type": "email"}]
}'

See the full Automation guide for every trigger type, operator, and action, and Create Alert for the write endpoints.

MethodAvailability
EmailAll plans
Discord / Slack / Telegram / WebhookAll plans
SMSBusiness plan and above