Remove
You can remove a track or album from My Library. Attempts to delete tracks that are not in My Library will result in an error, but attempts to remove albums that are not in My Library are silently ignored.
Endpoint URL
/api/users/:user_id/mymusic/:id
HTTP Method
DELETE
Authentication
OAuth 2.0: Access token required. See Authentication for examples and details.
Parameters
| Name | Required | Description | Example |
|---|---|---|---|
| user_id | required | The unique ID for the user. | 150470956064702464 |
| id | required | The unique ID of the track or album. | tr540889 |
Response Elements
| Response | Description |
|---|---|
| code |
Beats API response code. OK if successful; otherwise an error code is returned. |
Example Request
Suppose you would like to remove one of the tracks called "A Thousand Years" (track ID tr540889) from My Library. The general form of this API requires either a track or album ID, the user ID, and an access token:
curl -X DELETE "https://partner.api.beatsmusic.com/v1/api/users/[USER_ID]/mymusic/[TRACK_ID | ALBUM_ID]?
access_token=[YOUR_ACCESS_TOKEN]"
In this example we will remove the track "A Thousand Years" from My Library for user ID 150470956064702464:
curl -X DELETE"https://partner.api.beatsmusic.com/v1/api/users/150470956064702464/mymusic/tr540889?
access_token=[YOUR_ACCESS_TOKEN]"
Example Response
Open the Beats Music app on your mobile device. You will see that "A Thousand Years" no longer appears in My Library under Songs, and if that was the only song by the artist Sting, that artist no longer appears in My Library under Artists. Here is the API response indicating that you have successfully removed the track:
{"code":"OK"}

