Web Service Endpoint

Create a New Library Playlist

Create a new playlist in a user’s library.

URL

POST https://api.music.apple.com/v1/me/library/playlists

Query Parameters

include
[string]

Additional relationships to include in the fetch.

l
string

The localization to use, specified by a language tag. The possible values are in the supportedLanguageTags array belonging to the Storefront object specified by storefront. Otherwise, the storefront’s defaultLanguageTag is used.

HTTP Body

Response Codes

Created

Discussion

If successful, the HTTP status code is 201 (Created) and the data array in the ResponseRoot object contains the new library identifier for the resource and associated resource information. 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.

You can include an optional tracks relationship in this request.

Example

https://api.music.apple.com/v1/me/library/playlists{ "attributes":{ "name":"Some Playlist", "description":"My description" }, "relationships":{ "tracks":{ "data":[ { "id":"900032829", "type":"songs" } ] } }}
{ "data":[ { "id":"p.zp6KqKxsoQWAGN", "type":"library-playlists", "href":"/v1/me/library/playlists/p.zp6KqKxsoQWAGN", "attributes":{ "name":"Some Playlist", "description":{ "standard":"My description" }, "playParams":{ "id":"p.zp6KqKxsoQWAGN", "kind":"playlist", "isLibrary":true }, "canEdit":true } } ]}

See Also

Creating and Modifying User Playlists

Add Tracks to a Library Playlist

Add new tracks to the end of a library playlist.

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.