---
title: "Create Playlist"
method: POST
path: "/users/{user_id}/playlists"
tags: ["Playlists", "Library"]
---

# Create Playlist

`POST /users/{user_id}/playlists`

Create a playlist for a Spotify user. (The playlist will be empty until
you [add tracks](/documentation/web-api/reference/#/operations/add-tracks-to-playlist).)

## Path parameters

- `user_id` string, required — The user's [Spotify user ID](/documentation/web-api/#spotify-uris-and-ids).

## Request body

- object
  - `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](/documentation/general/guides/authorization-guide/#list-of-scopes)._
  - `description` string — value for playlist description as displayed in Spotify Clients and in the Web API.
  - `name` string, required — 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](/documentation/general/guides/authorization-guide/#list-of-scopes)

## Response `201`

A playlist

- PlaylistObject
  - `collaborative` boolean — `true` if the owner allows other users to modify the playlist.
  - `description` string, nullable — The playlist description. _Only returned for modified, verified playlists, otherwise_ `null`.
  - `external_urls` ExternalUrlObject
    - `spotify` string — The [Spotify URL](/documentation/web-api/#spotify-uris-and-ids) for the object.
  - `followers` FollowersObject
    - `href` string, nullable — This will always be set to null, as the Web API does not support it at the moment.
    - `total` integer — The total number of followers.
  - `href` string — A link to the Web API endpoint providing full details of the playlist.
  - `id` string — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the playlist.
  - `images` ImageObject[] — Images for the playlist. The array may be empty or contain up to three images. The images are returned by size in descending order. See [Working with Playlists](/documentation/general/guides/working-with-playlists/). _**Note**: If returned, the source URL for the image (`url`) is temporary and will expire in less than a day._
    - `height` integer, nullable, required — The image height in pixels.
    - `url` string, required — The source URL of the image.
    - `width` integer, nullable, required — The image width in pixels.
  - `name` string — The name of the playlist.
  - `owner` PlaylistOwnerObject
    - `external_urls` ExternalUrlObject
      - `spotify` string — The [Spotify URL](/documentation/web-api/#spotify-uris-and-ids) for the object.
    - `followers` FollowersObject
      - `href` string, nullable — This will always be set to null, as the Web API does not support it at the moment.
      - `total` integer — The total number of followers.
    - `href` string — A link to the Web API endpoint for this user.
    - `id` string — The [Spotify user ID](/documentation/web-api/#spotify-uris-and-ids) for this user.
    - `type` 'user' — The object type.
    - `uri` string — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for this user.
    - `display_name` string, nullable — The name displayed on the user's profile. `null` if not available.
  - `public` boolean — The playlist's public/private status: `true` the playlist is public, `false` the playlist is private, `null` the playlist status is not relevant. For more about public/private status, see [Working with Playlists](/documentation/general/guides/working-with-playlists/)
  - `snapshot_id` string — The version identifier for the current playlist. Can be supplied in other requests to target a specific playlist version
  - `tracks` PagingPlaylistTrackObject
    - `href` string, required — A link to the Web API endpoint returning the full result of the request
    - `limit` integer, required — The maximum number of items in the response (as set in the query or by default).
    - `next` string, nullable, required — URL to the next page of items. ( `null` if none)
    - `offset` integer, required — The offset of the items returned (as set in the query or by default)
    - `previous` string, nullable, required — URL to the previous page of items. ( `null` if none)
    - `total` integer, required — The total number of items available to return.
    - `items` PlaylistTrackObject[], required
      - `added_at` string, date-time — The date and time the track or episode was added. _**Note**: some very old playlists may return `null` in this field._
      - `added_by` PlaylistUserObject
        - `external_urls` ExternalUrlObject
          - `spotify` string — The [Spotify URL](/documentation/web-api/#spotify-uris-and-ids) for the object.
        - `followers` FollowersObject
          - `href` string, nullable — This will always be set to null, as the Web API does not support it at the moment.
          - `total` integer — The total number of followers.
        - `href` string — A link to the Web API endpoint for this user.
        - `id` string — The [Spotify user ID](/documentation/web-api/#spotify-uris-and-ids) for this user.
        - `type` 'user' — The object type.
        - `uri` string — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for this user.
      - `is_local` boolean — Whether this track or episode is a [local file](https://developer.spotify.com/web-api/local-files-spotify-playlists/) or not.
      - `track` union — Information about the track or episode.
        - object
          - `album` SimplifiedAlbumObject
            - `album_type` 'album' | 'single' | 'compilation', required — The type of the album.
            - `available_markets` string[], required — The markets in which the album is available: [ISO 3166-1 alpha-2 country codes](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). _**NOTE**: an album is considered available in a market when at least 1 of its tracks is available in that market._
            - `external_urls` ExternalUrlObject, required
              - …
            - `href` string, required — A link to the Web API endpoint providing full details of the album.
            - `id` string, required — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the album.
            - `images` ImageObject[], required — The cover art for the album in various sizes, widest first.
              - …
            - `name` string, required — The name of the album. In case of an album takedown, the value may be an empty string.
            - `release_date` string, required — The date the album was first released.
            - `release_date_precision` 'year' | 'month' | 'day', required — The precision with which `release_date` value is known.
            - `restrictions` AlbumRestrictionObject
              - …
            - `total_tracks` integer, required — The number of tracks in the album.
            - `type` 'album', required — The object type.
            - `uri` string, required — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the album.
            - `album_group` 'album' | 'single' | 'compilation' | 'appears_on' — The field is present when getting an artist's albums. Compare to album_type this field represents relationship between the artist and the album.
            - `artists` SimplifiedArtistObject[], required — The artists of the album. Each artist object includes a link in `href` to more detailed information about the artist.
              - …
          - `artists` ArtistObject[] — The artists who performed the track. Each artist object includes a link in `href` to more detailed information about the artist.
            - `external_urls` ExternalUrlObject
              - …
            - `followers` FollowersObject
              - …
            - `genres` string[] — A list of the genres the artist is associated with. If not yet classified, the array is empty.
            - `href` string — A link to the Web API endpoint providing full details of the artist.
            - `id` string — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the artist.
            - `images` ImageObject[] — Images of the artist in various sizes, widest first.
              - …
            - `name` string — The name of the artist.
            - `popularity` integer — The popularity of the artist. The value will be between 0 and 100, with 100 being the most popular. The artist's popularity is calculated from the popularity of all the artist's tracks.
            - `type` 'artist' — The object type.
            - `uri` string — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the artist.
          - `available_markets` string[] — A list of the countries in which the track can be played, identified by their [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
          - `disc_number` integer — The disc number (usually `1` unless the album consists of more than one disc).
          - `duration_ms` integer — The track length in milliseconds.
          - `explicit` boolean — Whether or not the track has explicit lyrics ( `true` = yes it does; `false` = no it does not OR unknown).
          - `external_ids` ExternalIdObject
            - `ean` string — [International Article Number](http://en.wikipedia.org/wiki/International_Article_Number_%28EAN%29)
            - `isrc` string — [International Standard Recording Code](http://en.wikipedia.org/wiki/International_Standard_Recording_Code)
            - `upc` string — [Universal Product Code](http://en.wikipedia.org/wiki/Universal_Product_Code)
          - `external_urls` ExternalUrlObject
            - `spotify` string — The [Spotify URL](/documentation/web-api/#spotify-uris-and-ids) for the object.
          - `href` string — A link to the Web API endpoint providing full details of the track.
          - `id` string — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the track.
          - `is_local` boolean — Whether or not the track is from a local file.
          - `is_playable` boolean — Part of the response when [Track Relinking](/documentation/general/guides/track-relinking-guide/) is applied. If `true`, the track is playable in the given market. Otherwise `false`.
          - `linked_from` LinkedTrackObject
            - `external_urls` ExternalUrlObject
              - …
            - `href` string — A link to the Web API endpoint providing full details of the track.
            - `id` string — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the track.
            - `type` string — The object type: "track".
            - `uri` string — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the track.
          - `name` string — The name of the track.
          - `popularity` integer — The popularity of the track. The value will be between 0 and 100, with 100 being the most popular.<br/>The popularity of a track is a value between 0 and 100, with 100 being the most popular. The popularity is calculated by algorithm and is based, in the most part, on the total number of plays the track has had and how recent those plays are.<br/>Generally speaking, songs that are being played a lot now will have a higher popularity than songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a single and an album) are rated independently. Artist and album popularity is derived mathematically from track popularity. _**Note**: the popularity value may lag actual popularity by a few days: the value is not updated in real time._
          - `preview_url` string — A link to a 30 second preview (MP3 format) of the track. Can be `null`
          - `restrictions` TrackRestrictionObject
            - `reason` string — The reason for the restriction. Supported values: - `market` - The content item is not available in the given market. - `product` - The content item is not available for the user's subscription type. - `explicit` - The content item is explicit and the user's account is set to not play explicit content. Additional reasons may be added in the future. **Note**: If you use this field, make sure that your application safely handles unknown values.
          - `track_number` integer — The number of the track. If an album has several discs, the track number is the number on the specified disc.
          - `type` 'track' — The object type: "track".
          - `uri` string — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the track.
        - object
          - `audio_preview_url` string, required — A URL to a 30 second preview (MP3 format) of the episode. `null` if not available.
          - `description` string, required — A description of the episode. HTML tags are stripped away from this field, use `html_description` field in case HTML tags are needed.
          - `duration_ms` integer, required — The episode length in milliseconds.
          - `explicit` boolean, required — Whether or not the episode has explicit content (true = yes it does; false = no it does not OR unknown).
          - `external_urls` ExternalUrlObject, required
            - `spotify` string — The [Spotify URL](/documentation/web-api/#spotify-uris-and-ids) for the object.
          - `href` string, required — A link to the Web API endpoint providing full details of the episode.
          - `html_description` string, required — A description of the episode. This field may contain HTML tags.
          - `id` string, required — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the episode.
          - `images` ImageObject[], required — The cover art for the episode in various sizes, widest first.
            - `height` integer, nullable, required — The image height in pixels.
            - `url` string, required — The source URL of the image.
            - `width` integer, nullable, required — The image width in pixels.
          - `is_externally_hosted` boolean, required — True if the episode is hosted outside of Spotify's CDN.
          - `is_playable` boolean, required — True if the episode is playable in the given market. Otherwise false.
          - `language` string — The language used in the episode, identified by a [ISO 639](https://en.wikipedia.org/wiki/ISO_639) code. This field is deprecated and might be removed in the future. Please use the `languages` field instead.
          - `languages` string[], required — A list of the languages used in the episode, identified by their [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639) code.
          - `name` string, required — The name of the episode.
          - `release_date` string, required — The date the episode was first released, for example `"1981-12-15"`. Depending on the precision, it might be shown as `"1981"` or `"1981-12"`.
          - `release_date_precision` 'year' | 'month' | 'day', required — The precision with which `release_date` value is known.
          - `restrictions` EpisodeRestrictionObject
            - `reason` string — The reason for the restriction. Supported values: - `market` - The content item is not available in the given market. - `product` - The content item is not available for the user's subscription type. - `explicit` - The content item is explicit and the user's account is set to not play explicit content. Additional reasons may be added in the future. **Note**: If you use this field, make sure that your application safely handles unknown values.
          - `resume_point` ResumePointObject, required
            - `fully_played` boolean — Whether or not the episode has been fully played by the user.
            - `resume_position_ms` integer — The user's most recent position in the episode in milliseconds.
          - `type` 'episode', required — The object type.
          - `uri` string, required — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the episode.
          - `show` SimplifiedShowObject, required
            - `available_markets` string[], required — A list of the countries in which the show can be played, identified by their [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
            - `copyrights` CopyrightObject[], required — The copyright statements of the show.
              - …
            - `description` string, required — A description of the show. HTML tags are stripped away from this field, use `html_description` field in case HTML tags are needed.
            - `explicit` boolean, required — Whether or not the show has explicit content (true = yes it does; false = no it does not OR unknown).
            - `external_urls` ExternalUrlObject, required
              - …
            - `href` string, required — A link to the Web API endpoint providing full details of the show.
            - `html_description` string, required — A description of the show. This field may contain HTML tags.
            - `id` string, required — The [Spotify ID](/documentation/web-api/#spotify-uris-and-ids) for the show.
            - `images` ImageObject[], required — The cover art for the show in various sizes, widest first.
              - …
            - `is_externally_hosted` boolean, required — True if all of the shows episodes are hosted outside of Spotify's CDN. This field might be `null` in some cases.
            - `languages` string[], required — A list of the languages used in the show, identified by their [ISO 639](https://en.wikipedia.org/wiki/ISO_639) code.
            - `media_type` string, required — The media type of the show.
            - `name` string, required — The name of the episode.
            - `publisher` string, required — The publisher of the show.
            - `total_episodes` integer, required — The total number of episodes in the show.
            - `type` 'show', required — The object type.
            - `uri` string, required — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the show.
  - `type` string — The object type: "playlist"
  - `uri` string — The [Spotify URI](/documentation/web-api/#spotify-uris-and-ids) for the playlist.

## Other responses

- `401` — 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.
- `403` — Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...). Unfortunately, re-authenticating the user won't help here.
- `429` — The app has exceeded its rate limits.

---

[API](https://skmtc.net/spotify/apis/sonallux.md) · [All operations](https://skmtc.net/spotify/apis/sonallux/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spotify/sonallux/versions/1459b27f2e48/schema)
