Add one or more tracks to a user’s playlist.

Use this endpoint to add Spotify tracks to a user’s playlist, sending their Spotify URI. Note that local tracks can’t be added.



Request Parameters

Path parameter
The user's Spotify user ID.
The Spotify ID for the playlist.

Header field
AuthorizationRequired. A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The access token must have been issued on behalf of the user.

Adding tracks to the current user's public playlists requires authorization of the playlist-modify-public scope; adding tracks to the current user's private playlist (including collaborative playlists) requires the playlist-modify-private scope. See Using Scopes.
Content-TypeRequired if URIs are passed in the request body, otherwise ignored. The content type of the request body: application/json

The Spotify URIs of the tracks to add can be passed either in the query string or as a JSON array in the request body.

Passing them in the query string:

Query parameterValue typeValue
urislist of Spotify URIsOptional. A comma-separated list of Spotify track URIs to add. For example:

A maximum of 100 tracks can be added in one request. Note: it is likely that passing a large number of track URIs as a query parameter will exceed the maximum length of the request URI. When adding a large number of tracks it is recommended to pass them in the request body, see below.
positionintegerOptional. The position to insert the tracks, a zero-based index. For example, to insert the tracks in the first position: position=0; to insert the tracks in the third position: position=2. If omitted, the tracks will be appended to the playlist. Tracks are added in the order they are listed in the query string or request body.

Passing them in the request body:

Request body dataValue typeValue
urisarray of Spotify URI stringsOptional. A JSON array of the Spotify track URIs to add. For example:
{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh",

A maximum of 100 tracks can be added in one request. Note: if the uris parameter is present in the query string, any URIs listed here in the body will be ignored.

Response Format

On success, the HTTP status code in the response header is 201 Created. The response body contains a snapshot_id in JSON format. The snapshot_id can be used to identify your playlist version in future requests. On error, the header status code is an error code and the response body contains an error object. Trying to add a track when you do not have the user’s authorization returns error 403 Forbidden.


curl -i -X POST ",spotify%3Atrack%3A1301WleyT98MSxVHPZCA6M" -H "Authorization: Bearer {your access token}" -H "Accept: application/json"
HTTP/1.1 201 Created
{ "snapshot_id" : "JbtmHBDBAYu3/bt8BOXKjzKx3i0b6LCa/wVjyl6qQ2Yf6nFXkbmzuEa+ZI/U1yF+" }

Try it