Web Service Endpoint

Add a Resource to a Library

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

URL

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

Query Parameters

ids
[string]
(Required)

The unique catalog identifiers for the resources. To indicate the type of resource to be added, ids must be followed by one of the allowed values. Multiple types can be added in the same request.

Response Codes

202 Accepted
Accepted

The modification request was accepted but may not have completed.

Discussion

If successful, the HTTP status code is 202 (Accepted) and there is no response body. Requested IDs that cannot be added to the library are ignored. 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?ids[albums]=1106659171&ids[songs]=1107054256&ids[music-videos]=267079116
No response body

See Also

iCloud Music Library and Library Playlists

Create a New Library Playlist

Create a new playlist in a user’s library.

Add Tracks to a Library Playlist

Add new tracks to the end of a library playlist.