Subscribe to Device Events
Developing
Retrieve real-time events generated by devices, such as status changes or alerts.
Request
Body Params application/json
{
"device_type": "lock"
}
Request Code Samples
curl --location --request GET '/devices/events' \
--header 'X-API-Key: your-api-key' \
--header 'Content-Type: application/json' \
--data-raw '{
"device_type": "lock"
}'
Responses
application/json
Successfully subscribed to events.
{
"events": [
{
"eventType": "lockAlert",
"timestamp": "2025-01-08T10:00:00Z",
"details": {
"door_feedback": "open"
}
}
]
}
Modified at 2025-05-09 12:02:09