device_update
PATCH
/v1/devices/{id}
const url = 'https://example.com/v1/devices/example';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"enabled":true,"push":true,"scope":"view"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/v1/devices/example \ --header 'Content-Type: application/json' \ --data '{ "enabled": true, "push": true, "scope": "view" }'Local only. Update enabled, push, or scope (view or decide); at least one field is required. Muting push preserves API/event access. Scope changes apply immediately. Disabled devices get 403 and their event WebSockets close with code 4403.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Media typeapplication/json
A paired remote device. The bearer token itself is never stored; only its
SHA-256 digest is (see remote::hash_token).
object
id
required
string
name
required
string
scope
required
view (read-only) or decide (adds decision, cancel and test requests).
string
enabled
required
boolean
push
required
boolean
created_at
required
integer format: int64
last_seen
integer | null format: int64
Examplegenerated
{ "id": "example", "name": "example", "scope": "example", "enabled": true, "push": true, "created_at": 1, "last_seen": 1}Invalid or empty body; submit scope cannot be changed
Unknown device