Skip to content

PostPlaylist

Walter Lara edited this page Mar 24, 2023 · 2 revisions

Post Playlist

Allows to add a new Playlist.

Request

URL: /v1/playlists

Method: POST

Path Parameters: None

Query Parameters: None

Headers:

Authorization: Bearer {accessToken}

Content-Type: application/json

Content:

Field Type Description Requirement Type
name string Playlist name. Required

Content example:

{
    "name": "The Weeknd - Top 10"
}

✅ Success Response

Code: 200 OK

Headers:

Content-Type: application/json

Content:

Field Type Description Condition
playlistId string UUID of the added Playlist. Always

Content example:

{
    "playlistId": "7bd2862f-8deb-4814-8943-156d9dab80dd"
}

❌ Error Responses

1. Bad Request

Code: 400 BAD REQUEST

Condition: If a mandatory content field is missing.

Headers:

Content-Type: application/json

Content example:

{
    "code": 400,
    "description": "Bad Request",
    "cause": "missing name"
}

2. Unauthorized

Code: 401 UNAUTHORIZED

Condition: If {accessToken} is invalid or expired.

See Also

Patch Playlist (Update Playlist)

Get Playlist

Get Playlists

Get Playlist Count

Delete Playlist

Put Playlist Song

Get Playlist Songs

Delete Playlist Song

Clone this wiki locally