---
title: "Create another playlist"
method: POST
path: "/api/playlist"
tags: ["playlist"]
---

# Create another playlist

`POST /api/playlist`

Create a new playlist that's owned by the current authenticated user

## Request body

- object
  - `name` string, required
  - `rules` SmartPlaylistRule[]
    - `id` integer, required
    - `rules` object[], required — An array of "subrules" (constraints) of the current rule
      - `id` integer, required
      - `model` 'title' | 'album.name' | 'artist.name' | 'interactions.play_count' | 'interactions.last_played_at' | 'length' | 'created_at' | 'updated_at', required
      - `operator` 'is' | 'isNot' | 'contains' | 'notContain' | 'isBetween' | 'isGreaterThan' | 'isLessThan' | 'beginsWith' | 'endsWith' | 'notInLast', required
      - `value` string[], required
  - `songs` string[] — An array of song IDs to populate the playlist. Only used if the playlist is not a smart one (i.e. `rules` are empty).

## Response `200`

OK

- Playlist — A Playlist model
  - `id` integer, required
  - `name` string, required
  - `rules` Playlist[], required — An array of Rule objects if the playlist is a Smart playlist
  - `is_smart` boolean, required — Whether the playlist is of Smart (dynamic) type

---

[API](https://skmtc.net/koel/apis/koel-api.md) · [All operations](https://skmtc.net/koel/apis/koel-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/koel/koel-api/revisions/b8837d22df45/schema)
