Create and populate a Spotify playlist via the Web API

domain: developer.spotify.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Obtain a user-authorized access token with at least the playlist-modify-public or playlist-modify-private scope via the Authorization Code or PKCE flow.
  2. Create the playlist by sending a POST request to the endpoint for a user's playlists (/v1/users/{user_id}/playlists), providing name, public flag, and optional description in the JSON body.
  3. Note the playlist id returned in the response.
  4. Gather the Spotify URI strings (spotify:track:{id}) for the tracks you wish to add.
  5. Add tracks by sending a POST request to the playlist items endpoint (/v1/playlists/{playlist_id}/tracks) with a JSON body containing a uris array of track URIs.
  6. To add more than 100 tracks, batch requests into groups of up to 100 URIs per call.

Known gotchas

Related routes

Authenticate with Spotify using OAuth PKCE and create a playlist
spotify-api · 6 steps · unrated
Read a user's current Spotify playback state via the Web API Player endpoints
developer.spotify.com · 5 steps · unrated
Create a playlist in a signed-in user's Apple Music library and add catalog tracks to it via the Apple Music API
developer.apple.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans