Sonos Music API > addToContainer

Sonos uses addToContainer to add content to a playlist. See Add playlists for details.

Request parameters

The maximum string length is listed in parentheses. This will be URL-encoded in firmware so pay attention to length when approaching this limit.

Name Type Description
id string(255) Unique ID of the item to add.
parentId string(255) Unique ID of the playlist.
index int Position in the playlist where the new content should appear. If you receive an index set to 0, add the content to the beginning of the playlist. If you receive an index set to -1, add the content to the end of the playlist.
updateId string(255) Future implementation. Can be used to handle editing collisions.

Response

Include the response in an addToContainerResult inside an addToContainerResponse element.

Name Type Description
uniqueId string(255) Future implementation. Can be used to handle editing collisions and data concurrency validation.

Sample request

Sample response