<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MusicKit",
  "identifier" : "/documentation/MusicKit/MusicLibrary/createPlaylist(name:description:authorDisplayName:items:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MusicKit"
    ],
    "preciseIdentifier" : "s:8MusicKit0A7LibraryC14createPlaylist4name11description17authorDisplayName5itemsAA0E0VSS_SSSgAKxtYaKSTRzAA0aE7AddableR_7ElementQzRs_r0_lF"
  },
  "title" : "createPlaylist(name:description:authorDisplayName:items:)"
}
-->

# createPlaylist(name:description:authorDisplayName:items:)

Creates a playlist in the user’s music library.

```
@discardableResult func createPlaylist<S, MusicPlaylistAddableType>(name: String, description: String? = nil, authorDisplayName: String? = nil, items: S) async throws -> Playlist where S : Sequence, MusicPlaylistAddableType : MusicPlaylistAddable, MusicPlaylistAddableType == S.Element
```

## Parameters

`name`

The name of the playlist.

`description`

An optional description of the playlist.

`authorDisplayName`

The display name of the author for the playlist.
A `nil` value will result in the framework using
your app’s name instead.

`items`

The items of the playlist.

## Return Value

The newly created playlist.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)