Playlists

Create Playlist

POST
/users/{user_id}/playlists

Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.) Each user is generally limited to a maximum of 11000 playlists.

Authorization

oauth_2_0 playlist-modify-public, playlist-modify-private
AuthorizationBearer <token>

Spotify supports OAuth 2.0 for authenticating all API requests.

In: header

Scope: playlist-modify-public, playlist-modify-private

Path Parameters

user_id*User ID

The user's Spotify user ID.

Request Body

application/json

name*string

The name for the new playlist, for example "Your Coolest Playlist". This name does not need to be unique; a user may have several playlists with the same name.

public?boolean

Defaults to true. If true the playlist will be public, if false it will be private. To be able to create private playlists, the user must have granted the playlist-modify-private scope

collaborative?boolean

Defaults to false. If true the playlist will be collaborative. Note: to create a collaborative playlist you must also set public to false. To create collaborative playlists you must have granted playlist-modify-private and playlist-modify-public scopes.

description?string

value for playlist description as displayed in Spotify Clients and in the Web API.

[key: string]?any

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/users/smedjan/playlists" \  -H "Content-Type: application/json" \  -d '{    "name": "New Playlist",    "description": "New playlist description",    "public": false  }'
{  "collaborative": true,  "description": "string",  "external_urls": {    "spotify": "string"  },  "followers": {    "href": "string",    "total": 0  },  "href": "string",  "id": "string",  "images": [    {      "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",      "height": 300,      "width": 300    }  ],  "name": "string",  "owner": {    "external_urls": {      "spotify": "string"    },    "followers": {      "href": "string",      "total": 0    },    "href": "string",    "id": "string",    "type": "user",    "uri": "string",    "display_name": "string"  },  "public": true,  "snapshot_id": "string",  "tracks": {    "href": "https://api.spotify.com/v1/me/shows?offset=0&limit=20\n",    "limit": 20,    "next": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",    "offset": 0,    "previous": "https://api.spotify.com/v1/me/shows?offset=1&limit=1",    "total": 4,    "items": [      {        "added_at": "2019-08-24T14:15:22Z",        "added_by": {          "external_urls": {            "spotify": "string"          },          "followers": {            "href": "string",            "total": 0          },          "href": "string",          "id": "string",          "type": "user",          "uri": "string"        },        "is_local": true,        "track": {          "album": {            "album_type": "compilation",            "total_tracks": 9,            "available_markets": [              "CA",              "BR",              "IT"            ],            "external_urls": {              "spotify": "string"            },            "href": "string",            "id": "2up3OPMp9Tb4dAKM2erWXQ",            "images": [              {                "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",                "height": 300,                "width": 300              }            ],            "name": "string",            "release_date": "1981-12",            "release_date_precision": "year",            "restrictions": {              "reason": "market"            },            "type": "album",            "uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",            "artists": [              {                "external_urls": {                  "spotify": "string"                },                "href": "string",                "id": "string",                "name": "string",                "type": "artist",                "uri": "string"              }            ]          },          "artists": [            {              "external_urls": {                "spotify": "string"              },              "followers": {                "href": "string",                "total": 0              },              "genres": [                "Prog rock",                "Grunge"              ],              "href": "string",              "id": "string",              "images": [                {                  "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228\n",                  "height": 300,                  "width": 300                }              ],              "name": "string",              "popularity": 0,              "type": "artist",              "uri": "string"            }          ],          "available_markets": [            "string"          ],          "disc_number": 0,          "duration_ms": 0,          "explicit": true,          "external_ids": {            "isrc": "string",            "ean": "string",            "upc": "string"          },          "external_urls": {            "spotify": "string"          },          "href": "string",          "id": "string",          "is_playable": true,          "linked_from": {            "external_urls": {              "spotify": "string"            },            "href": "string",            "id": "string",            "type": "string",            "uri": "string"          },          "restrictions": {            "reason": "string"          },          "name": "string",          "popularity": 0,          "preview_url": "string",          "track_number": 0,          "type": "track",          "uri": "string",          "is_local": true        }      }    ]  },  "type": "string",  "uri": "string"}