Add device content
Add a Content Studio item to the device’s loop or fixed list.
Add a Content Studio item to the device’s loop or fixed list.
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.
- Get the serial number for a device you can control.
Request Examples
At the top of the form, choose Loop list or Fixed list. Leave the loop position blank to add the item at the end. For the fixed list, use Request Body to select the start time, end time, and weekdays.
/api/authV2/open/device/:deviceId/tasks/:taskTypeGenerated Code
Before running an example, replace placeholders such as {{VARIABLE}} with actual values and remove the surrounding double braces.
1// Generating...Response Example
HTTP 201
{
"taskKey": "q3Ck109u5Lfm",
"revision": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210"
}Troubleshooting
Endpoint
/api/authV2/open/device/:deviceId/tasks/:taskType
Method
POST
Path Parameters
Prop
Type
Request Schema
Prop
Type
Parameters
Parameters
Get the revision from List device content first. It applies to that device and list only.
Use Read content details to check the required settings.
This saves the list change. To show an existing item now, use Display a specific item.
For an image field, use the object returned by Upload a content image.
When details return supportsSavedConnection: true, use connection to choose a saved profile, or send {"mode":"custom","value":"YOUR_PROVIDER_VALUE"} from your own script to supply the provider value. Dot encrypts the value for that item. The account holder still needs to grant access for third-party OAuth services.
Response Schema
Prop
Type
Status Codes
| HTTP status | What to do |
|---|---|
400 | Check the values of required path, query, or body fields. |
401 | Renew web authorization or check your API key or access token. |
403 | Check that your account can access this device. |
400 CONTENT_LIST_FULL | The list is full. Remove an item before adding another. |
400 CONTENT_INVALID_LIST_SETTINGS | A fixed item requires schedule. Use position or append for a loop item. |
400 CONTENT_INVALID_POSITION | Use an insertion position from zero to the current list length. |
400 CONTENT_INVALID_SCHEDULE | Check that date and time are valid in the device timezone. |
400 CONTENT_SETTING_REQUIRED | Read the content details and provide the required input. |
400 CONTENT_CONNECTION_REQUIRED | If the template requires a service, check its connection requirements in the content details. |
404 CONTENT_NOT_AVAILABLE | Content unavailable. Check the content ID, device compatibility, and region. |
409 CONTENT_LIST_CHANGED | The list changed. Use List device content to obtain a new revision and confirm the target before retrying. |
404 | Check that the device serial number is registered. |
429 | Wait for the number of seconds in Retry-After. See API rate limits. |
Use dot_add_device_content with Dot Assistant.
Did this solve your problem?
Join our community