Create a playlist in a signed-in user's Apple Music library and add catalog tracks to it via the Apple Music API

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

Steps

  1. Complete MusicKit authorization to obtain a Music User Token for the target user, in addition to your app's developer token
  2. Send `POST /v1/me/library/playlists` with both `Authorization: Bearer <developer-token>` and `Music-User-Token` headers
  3. Build the request body with an `attributes` object containing at least `name`, and optionally `description`
  4. To seed the playlist with tracks at creation time, include a `relationships.tracks.data` array of catalog song objects (each with `id` and `type: "songs"`) in the same request body
  5. Read the `id` (of type `library-playlists`) from the response and use it for subsequent operations, such as adding more tracks later via the playlist tracks relationship endpoint
  6. Verify the playlist by fetching `GET /v1/me/library/playlists/{id}` and confirming the expected tracks relationship

Known gotchas

Related routes

Obtain a Music User Token via MusicKit JS or MusicKit on Apple platforms and use it alongside a developer token to read a signed-in user's Apple Music library
developer.apple.com · 6 steps · unrated
Create and populate a Spotify playlist via the Web API
developer.spotify.com · 6 steps · unrated
update a playlist's creatives via the novisign api
novisign.com · 5 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