Skip to content
DocumentationAPI Reference

Change Playlist Details

client.Playlists.Update(ctx, playlistID, body) error
PUT/playlists/{playlist_id}

Change a playlist's name and public/private state. (The user must, of course, own the playlist.)

ParametersExpand Collapse
playlistID string

The Spotify ID of the playlist.

body PlaylistUpdateParams
Collaborative param.Field[bool]optional

If true, the playlist will become collaborative and other users will be able to modify the playlist in their Spotify client.
Note: You can only set collaborative to true on non-public playlists.

Description param.Field[string]optional

Value for playlist description as displayed in Spotify Clients and in the Web API.

Name param.Field[string]optional

The new name for the playlist, for example "My New Playlist Title"

Published param.Field[bool]optional

The playlist's public/private status (if it should be added to the user's profile or not): true the playlist will be public, false the playlist will be private, null the playlist status is not relevant. For more about public/private status, see Working with Playlists

Change Playlist Details

package main

import (
  "context"

  "github.com/cjavdev/spotted-go"
  "github.com/cjavdev/spotted-go/option"
)

func main() {
  client := spotted.NewClient(
    option.WithAccessToken("My Access Token"),
  )
  err := client.Playlists.Update(
    context.TODO(),
    "3cEYpjA9oz9GiPac4AsH4n",
    spotted.PlaylistUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples