Web Service Endpoint

Add Tracks to a Library Playlist

Add new tracks to the end of a library playlist.

URL

POST https://api.music.apple.com/v1/me/library/playlists/{id}/tracks

HTTP Body

The POST request containing the ID and type for the track to be added.

Response Codes

204 No Content
No Content

The modification was successful, but there is no content in the response.

Discussion

If successful, the HTTP status code is 204 (No Content) and there is no response body. If unsuccessful, the HTTP status code indicates the error and the details are in the errors array. See Handle a Response.

This endpoint requires a music user token. See Getting Keys and Creating Tokens.

Example

https://api.music.apple.com/v1/me/library/playlists/p.zp6KqKxsoQWAGN/tracks{ "data":[ { "id":"201281527", "type":"songs" }, { "id":"639032181", "type":"music-videos" } ]}
No response body

See Also

Creating and Modifying User Playlists

Create a New Library Playlist

Create a new playlist in a user’s library.

Add a Resource to a Library

Add a catalog resource to a user’s iCloud Music Library.

object LibraryPlaylistCreationRequest

A request to create a new playlist in a user's library.

object LibraryPlaylistTracksRequest

A request to add tracks to a library playlist.

object LibraryPlaylistRequestTrack

An object that represents a single track when added to a library playlist in a request.