---
updatedAt: 2026-09-10T14:06:13.000Z
agentTools:
  siteIndex: https://docs.jwplayer.com/llms.txt
  projectIndex: https://docs.jwplayer.com/players/llms.txt
---

# WEB  PLAYER: Create a playlist

```curl cURL
curl --request POST \
     --url https://api.jwplayer.com/v2/sites/{site_id}/playlists/{playlist_type}/ \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
     "metadata": {
          "media_filter": {
               "sort": "publish_start_date:dsc",
               "limit": 25
          },
          "title": "New Playlist",
          "description": "The content of my new playlist",
          "author": "Author name",
          "link": "www.example.com"
     }
}'
```

```python Python
import requests

url = "https://api.jwplayer.com/v2/sites/{site_id}/playlists/{playlist_type}/"

payload = {"metadata": {
        "media_filter": {
            "sort": "publish_start_date:dsc",
            "limit": 25
        },
        "title": "New Playlist",
        "description": "The content of my new playlist",
        "author": "Author name",
        "link": "www.example.com"
    }}
headers = {
    "accept": "application/json",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

# Replace the site_id path parameter with a site ID.

<!-- curl@2 -->
<!-- python@3 -->

The [site ID](https://docs.jwplayer.com/platform/reference/building-a-request#site-id) can be retrieved from your JWP dashboard.

# Replace the playlist_type path parameter with a playlist type.

<!-- curl@2 -->
<!-- python@3 -->

The possible playlist types are:

- `manual_playlist`
- `dynamic_playlist`
- `article_matching_playlist`
- `search_playlist`
- `recommendations_playlist`

See [Playlist Overview](https://docs.jwplayer.com/platform/docs/vdh-playlist-overview) for an *overview* of each playlist type.

# Define metadata parameters for the playlist

<!-- curl@12-15 -->
<!-- python@10-13 -->

At a minimum, the following metadata parameters should be included to create a new playlist:

<table>
    <thead>
        <tr>
            <th> Parameter </th>
            <th> Details </th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td> <strong>title</strong> <code>string</code> </td>
            <td> Title of the playlist. <br /><br />When using JW Player's HTML5 player, the playlist title is displayed in the overlay.<br /><br />A maximum of 256 characters is permitted. </td>
        </tr>
        <tr>
            <td> <strong>description</strong> <code>string</code> </td>
            <td> Description of the playlist<br /><br /> A maximum of 7500 characters is permitted. </td>
        </tr>
        <tr>
            <td> <strong>author</strong> <code>string</code> </td>
            <td> Author of the playlist<br /><br /> A maximum of 256 characters is permitted. </td>
        </tr>
        <tr>
            <td> <strong>link</strong> <code>string</code> </td>
            <td> URL to be associated with the playlist<br /><br /> A maximum of 2048 characters is permitted. </td>
        </tr>
    </tbody>
</table>

# (Optional) Limit the number of media items in a playlist.

<!-- curl@8-10 -->
<!-- python@6-8 -->

To limit the number of media items in a playlist utilize the `media_filter` object.  

| Parameter | Details |
|--|--|
| **sort** `string`  | Only applies to [dynamic playlists](https://docs.jwplayer.com/platform/reference/post_v2-sites-site-id-playlists-dynamic-playlist), dictating playlist ordering. |
|**limit** `integer` | For manual playlists, the limit determines the maximum number of media that can be included in a given playlist. |