Devices
Create Device Events
Changed onCreate events for a Device.
When a Device is managed by a SmartApp, the Device is responsible for creating events to update the Device attributes on the SmartThings Platform.
The OAuth token used must be for the SmartApp that created the Device.
post/devices/{deviceId}/events
Request
- Base URLhttps://api.smartthings.com/v1
- AuthOAuth 2Implicithttps://auth-global.api.smartthings.comScopesi:deviceprofiles
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"deviceEvents": [
{
"component": "main",
"capability": "switchLevel",
"attribute": "level",
"value": 0,
"unit": null,
"data": null
}
]
}Response
Created events.
Create Device Events Response required
Changes
- info
the security scope
i:deviceprofileswas added to the endpoint's security schemeBearer - info
the security scope
w:devices:*was removed from the endpoint's security schemeBearer
- info