Manage SmartThings Rules using the SmartThings Rules API to create condition-action automations

domain: developer.smartthings.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Obtain a SmartThings Personal Access Token (PAT) from the SmartThings Developer Console with the rules:read and rules:write scopes
  2. List existing rules for a location: GET https://api.smartthings.com/v1/rules?locationId=<location_id> with Authorization: Bearer YOUR_TOKEN
  3. Construct a rule JSON payload with an 'if' condition block (e.g., a device attribute reaching a threshold) and a 'then' action block (e.g., a command action to control another device)
  4. Create the rule: POST https://api.smartthings.com/v1/rules with the rule JSON body and the locationId query parameter
  5. Execute the rule manually for testing: POST https://api.smartthings.com/v1/rules/execute/<rule_id>?locationId=<location_id>
  6. Delete or update the rule as needed using DELETE or PUT on https://api.smartthings.com/v1/rules/<rule_id>

Known gotchas

Related routes

Read Front's automation Rules configuration via the read-only Rules API
dev.frontapp.com · 5 steps · unrated
Control and subscribe to SmartThings devices and scenes using the SmartThings REST API
developer.smartthings.com · 6 steps · unrated
create and monitor MailerLite automations via the API (trigger/step configuration remains UI-only)
developers.mailerlite.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans