Device Settings
Use the Device Settings API to read or update settings for a device owned by the authenticated API key user. Writes use POST; omitted fields stay unchanged.
Quick Guide
Prerequisites
- In the Playground, sign in to Dot and select Authorize. In a script, use a personal API key or an OAuth access token as a Bearer token.
- Have the serial number of a device linked to your account.
Request Examples
Read Settings
/api/authV2/open/device/:deviceId/settingsGenerated Code
Before running an example, replace placeholders such as {{VARIABLE}} with actual values and remove the surrounding double braces.
1// Generating...Update Settings
To update the sleep window, choose whether to enable it and set both times. Choose different start and end times in the device's time zone. Leave all three fields unset to keep the current sleep window.
/api/authV2/open/device/:deviceId/settingsGenerated Code
Before running an example, replace placeholders such as {{VARIABLE}} with actual values and remove the surrounding double braces.
1// Generating...Response Example
Read Settings
{
"deviceId": "ABCD1234ABCD",
"alias": "Office Dot",
"location": "Desk",
"timezone": "Asia/Shanghai",
"interval": {
"powerMs": 900000,
"batteryMs": 10800000
},
"sleep": {
"enabled": true,
"start": "23:00",
"end": "07:00"
}
}Update Settings
{
"message": "Settings saved for device ABCD1234ABCD."
}Troubleshooting
Endpoint
/api/authV2/open/device/:deviceId/settings
Method
GET / POST
Path Parameters
Prop
Type
Request Schema
GET has no request body. With POST, send the fields you want to change.
Prop
Type
Parameters
Parameters
Automatic switching intervals
| Device | External power | Battery power |
|---|---|---|
| Quote/0 | 1 minute–12 hours | 1 minute–12 hours |
These ranges apply to automatic switching. Manual refresh is not limited by this interval. Settings requests outside the range are rejected.
Timezones
The timezone field only accepts keys returned by the Get Timezones API. See the Get Timezones page for the current server-supported timezone list.
Response Schema
The read response contains the device serial number, name, location, timezone, automatic switching intervals, and sleep schedule. If no sleep schedule is set, sleep is null. The update response returns message to report whether the settings were saved and sent to the device or will take effect when it next wakes.
GET
Prop
Type
Parameters
Parameters
POST
Prop
Type
Status Codes
| HTTP status code | Description |
|---|---|
400 | Check the device serial number and the settings you sent. |
401 | Grant web access again, or check the API key and OAuth access token. |
403 | Check that your account can access this device. |
404 | Check that the device serial number is registered. |
429 | Wait for the number of seconds in Retry-After. |
Did this solve your problem?
Join our community