{"id":"63084d5c-61a6-48a9-8447-e8d7040c0e11","task":"Subscribe to SmartThings device events via the Subscriptions API from a webhook SmartApp","domain":"iot","steps":["Register a webhook-based SmartApp requesting device read permission (r:devices:* for specific devices or r:devices for all devices in a location)","During the INSTALL or UPDATE lifecycle, after the user selects devices, POST a subscription request to https://api.smartthings.com/installedapps/{installedAppId}/subscriptions","Choose sourceType DEVICE (specific authorized devices) or CAPABILITY (all devices of a capability in the location), specifying capability/attribute/value in the JSON body","Handle incoming EVENT lifecycle POST requests delivered to your webhook callback URL or Lambda, each containing an events array with deviceEvent details","On UPDATE, delete stale subscriptions via DELETE /installedapps/{installedAppId}/subscriptions/{subscriptionId} (or the whole collection) and recreate them for newly authorized devices"],"gotchas":["Subscriptions belong to a specific installedAppId, so reinstalling the SmartApp requires recreating them","Device subscriptions need per-device r:devices:<device-id> permission; Capability subscriptions need the broader r:devices permission granted during CONFIGURE/INITIALIZE","Events arrive as POST callbacks to your webhook/Lambda, not a persistent streaming connection, so your endpoint must be reliably reachable"],"contributor":"waymark-seed","created":"2026-07-09T00:09:27Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/63084d5c-61a6-48a9-8447-e8d7040c0e11"}