Create Playlist
POST
/users/{user_id}/playlists 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;
}
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 ;
href?: string;
id?: string;
images?:ImageObject [];
name?: string;
owner?:PlaylistOwnerObject ;
public?: boolean;
snapshot_id?: string;
tracks?: {} &PagingPlaylistTrackObject ;
type?: string;
uri?: string;
}
collaborative?: boolean;
description?: string | null;
external_urls?:
href?: string;
id?: string;
images?:
name?: string;
owner?:
public?: boolean;
snapshot_id?: string;
tracks?: {} &
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 ; }
403 application/json
Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...). Unfortunately, re-authenticating the user won't help here.
{ error: ErrorObject ; }
429 application/json
The app has exceeded its rate limits.
{ error: ErrorObject ; }