Add a playlist to a game
const url = 'https://api.thebgdb.org/v1/games/5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77/playlists';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"https://open.spotify.com/playlist/37i9dQZF1DX4sWSpwq3LiO?si=abc","title":"Island traders: calm medieval folk"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.thebgdb.org/v1/games/5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77/playlists \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://open.spotify.com/playlist/37i9dQZF1DX4sWSpwq3LiO?si=abc", "title": "Island traders: calm medieval folk" }'Send the address of a playlist or an album on Apple Music (music.apple.com), Spotify (open.spotify.com) or YouTube and YouTube Music (youtube.com/playlist?list=…); no other site is accepted, and neither are single tracks, mixes or personal lists such as “liked”. Only the service, the kind and the playlist’s id there are kept, and url is rebuilt from them. The title is the playlist’s own, read from the service; title is only used when the service does not give one (a private playlist, or the service not answering), so it can be left out. The playlist is listed at once. A playlist is listed once: the address of one already listed for another game links it to this game too, with its title, votes and score. The member’s email address must be confirmed. A member can send five posts a minute and 20 playlists a day.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The game’s id, as returned in every game object. The game’s slug is accepted too, and so is an address it had before: a slug changed when the game was renamed by the addressing rule, or the id or slug of an entry merged into it because both were the same game. The answer is the game under its current id and slug; compare them with what you sent to update a stored link.
Example
5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77Request Bodyrequired
Section titled “Request Bodyrequired”object
A playlist or album page on Apple Music, Spotify or YouTube.
A title to fall back on when the service does not give the playlist’s own.
Example
{ "url": "https://open.spotify.com/playlist/37i9dQZF1DX4sWSpwq3LiO?si=abc", "title": "Island traders: calm medieval folk"}Responses
Section titled “Responses”The playlist is listed.
object
object
youtube covers YouTube and YouTube Music.
Where to listen, built from the service and the playlist’s id there.
Votes up minus votes down.
How many members voted, either way.
Display name of the member who added it; null for a playlist the catalog imported rather than a member added.
Example
{ "data": { "id": "7d1c1a0e-2f0b-4d39-9a56-5a8d2b9d7c21", "provider": "spotify", "kind": "playlist", "title": "Island traders: calm medieval folk", "url": "https://open.spotify.com/playlist/37i9dQZF1DX4sWSpwq3LiO", "score": 0, "votes": 0, "submittedBy": "Ana", "createdAt": "2026-11-20T18:04:11.120Z" }}The address is not a playlist or album on one of the three services, the title is longer than 120 characters, or the service gave no title and none of 2 to 120 characters was sent.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}The request has no valid session token.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}The member has not confirmed their email address.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}No game has this id.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}This playlist is already listed for this game, or was and is no longer shown.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}Rate limited, more than five posts in a minute, or 20 playlists already added today.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}