Search + K

Command Palette

Search for a command to run...

Sign In

Create Playlist

POST /users/{user_id}/playlists
Copy endpoint
https://api.spotify.com/v1

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.

Parameters

path Path Parameters

Name Type
user_id required
string

Request Body

application/json
{
name: string;
public?: boolean;
collaborative?: boolean;
description?: string;
[key: string]: unknown;
}

Responses

201 application/json

A playlist

interface PlaylistObject {
collaborative?: boolean;
description?: string | null;
external_urls?: ExternalUrlObject
interface ExternalUrlObject {
spotify?: string;
}
;
href?: string;
id?: string;
images?: ImageObject
interface ImageObject {
url: string;
height: number | null;
width: number | null;
}
[]
;
name?: string;
owner?: PlaylistOwnerObject
type PlaylistOwnerObject = PlaylistUserObject & { display_name?: string | null; }
;
public?: boolean;
snapshot_id?: string;
tracks?: {} & PagingPlaylistTrackObject
type PagingPlaylistTrackObject = never
;
type?: string;
uri?: string;
}

Client Errors

401 application/json

Bad or expired token. This can happen if the user revoked a token or the access token has expired. You should re-authenticate the user.

{ error: ErrorObject
interface ErrorObject {
status: number;
message: string;
}
; }
403 application/json

Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...). Unfortunately, re-authenticating the user won't help here.

{ error: ErrorObject
interface ErrorObject {
status: number;
message: string;
}
; }
429 application/json

The app has exceeded its rate limits.

{ error: ErrorObject
interface ErrorObject {
status: number;
message: string;
}
; }