Using the spotify integration
you can manipulate Spotify devices by sending json requests from your device:
get devices
Request
{
"spotify.devices" : ""
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.devices.response" : {
"the id" : {
"volume" : 59,
"name" : "Kitchen speaker"
}
}
}
currently playing
Request
{
"spotify.currently-playing" : ""
}
Example response
{
"spotify.currently-playing.response" : {
"isPlaying" : false,
"item" : {
"artist" : "Sample Artist",
"album" : "Sample Album",
"name" : "Sample Track"
},
"device" : {
"volumepercent" : 59,
"name" : "Kitchen speaker",
"id" : "string"
}
},
"endpointId" : "test-endpoint-id"
}
get state
Request
{
"spotify.state" : ""
}
Example response
{
"spotify.state.response" : {
"isPlaying" : true,
"item" : {
"artist" : "Sample Artist",
"album" : "Sample Album",
"name" : "Sample Track"
},
"shuffling" : false,
"device" : {
"volumepercent" : 59,
"name" : "Kitchen speaker",
"id" : "string"
}
},
"endpointId" : "test-endpoint-id"
}
like current track
Request
{
"spotify.like" : ""
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.like.response" : {
"result" : "OK"
}
}
next track
Request
{
"spotify.next" : ""
}
Example response
{
"spotify.next.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
previous track
Request
{
"spotify.previous" : ""
}
Example response
{
"spotify.previous.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
pause playback
Request
{
"spotify.pause" : ""
}
Example response
{
"spotify.pause.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
stop playback
Request
{
"spotify.stop" : ""
}
Example response
{
"spotify.stop.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
play
Request
{
"spotify.play" : ""
}
Example response
{
"spotify.play.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
play album
Request
{
"spotify.play.items" : "spotify:album:the context_uri"
}
Example response
{
"spotify.play.items.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
play artist
Request
{
"spotify.play.items" : "spotify:artists:the context_uri"
}
Example response
{
"spotify.play.items.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
play playlists
Request
{
"spotify.play.items" : "spotify:playlists:the context_uri"
}
Example response
{
"spotify.play.items.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
play on device
Request
{
"spotify.play.on" : "the id"
}
Example response
{
"spotify.play.on.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
play items on device
Request
{
"spotify.play.items" : "spotify:track:playing on device",
"spotify.play.on" : "the id"
}
Example response
{
"spotify.play.on.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
play multiple tracks
Request
{
"spotify.play.items" : [ "spotify:track:track1", "spotify:track:track2" ]
}
Example response
{
"spotify.play.items.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
play single track
Request
{
"spotify.play.items" : "spotify:track:the context_uri"
}
Example response
{
"spotify.play.items.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
play single track in array
Request
{
"spotify.play.items" : [ "spotify:track:single track in array" ]
}
Example response
{
"spotify.play.items.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
play single track from playlist data
Request
{
"spotify.play.items" : "spotify:track:a single track"
}
Example response
{
"spotify.play.items.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
play with no active player
Request
{
"spotify.play" : ""
}
Example response
{
"spotify.play.response" : {
"result" : "NO_ACTIVE_PLAYER"
},
"endpointId" : "test-endpoint-id"
}
repeat context
Request
{
"spotify.repeat" : "context"
}
Example response
{
"spotify.repeat.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
repeat track
Request
{
"spotify.repeat" : "track"
}
Example response
{
"spotify.repeat.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
repeat off
Request
{
"spotify.repeat" : "off"
}
Example response
{
"spotify.repeat.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
shuffle on
Request
{
"spotify.shuffle" : "on"
}
Example response
{
"spotify.shuffle.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
shuffle off
Request
{
"spotify.shuffle" : "Off"
}
Example response
{
"spotify.shuffle.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
set volume
Request
{
"spotify.volume" : "12"
}
Example response
{
"spotify.volume.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
unlike current track
Request
{
"spotify.unlike" : ""
}
Example response
{
"spotify.unlike.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
get album
Request
{
"spotify.albums.get" : "album-id"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.albums.get.response" : {
"result" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ],
"tracks" : null,
"copyrights" : [ ],
"external_ids" : null,
"genres" : [ ],
"label" : null,
"popularity" : null
}
}
}
get several albums
Request
{
"spotify.albums.get.several" : "ids=album-1,album-2"
}
Example response
{
"spotify.albums.get.several.response" : {
"result" : {
"albums" : [ {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-1",
"images" : [ ],
"name" : "Morning Drive",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ],
"tracks" : null,
"copyrights" : [ ],
"external_ids" : null,
"genres" : [ ],
"label" : null,
"popularity" : null
}, {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-2",
"images" : [ ],
"name" : "Evening Chill",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ],
"tracks" : null,
"copyrights" : [ ],
"external_ids" : null,
"genres" : [ ],
"label" : null,
"popularity" : null
} ]
}
},
"endpointId" : "test-endpoint-id"
}
get album tracks
Request
{
"spotify.albums.tracks" : "album-id"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.albums.tracks.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-id",
"name" : "Sample Track"
} ]
}
}
}
get users saved albums
Request
{
"spotify.albums.saved.get" : "limit=2"
}
Example response
{
"spotify.albums.saved.get.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ],
"tracks" : null,
"copyrights" : [ ],
"external_ids" : null,
"genres" : [ ],
"label" : null,
"popularity" : null
}
} ]
}
},
"endpointId" : "test-endpoint-id"
}
save albums for current user
Request
{
"spotify.albums.saved.save" : "[\"album-id\"]"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.albums.saved.save.response" : {
"result" : "OK"
}
}
remove users saved albums
Request
{
"spotify.albums.saved.remove" : "[\"album-id\"]"
}
Example response
{
"spotify.albums.saved.remove.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
check users saved albums
Request
{
"spotify.albums.saved.check" : "ids=album-id"
}
Example response
{
"spotify.albums.saved.check.response" : {
"result" : [ true ]
},
"endpointId" : "test-endpoint-id"
}
get new releases
Request
{
"spotify.albums.new-releases" : "country=US"
}
Example response
{
"spotify.albums.new-releases.response" : {
"result" : {
"albums" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
} ]
}
}
},
"endpointId" : "test-endpoint-id"
}
get artist
Request
{
"spotify.artists.get" : "artist-id"
}
Example response
{
"spotify.artists.get.response" : {
"result" : {
"genres" : [ ],
"id" : "artist-id",
"images" : [ ],
"name" : "Sample Artist"
}
},
"endpointId" : "test-endpoint-id"
}
get several artists
Request
{
"spotify.artists.get.several" : "ids=artist-1,artist-2"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.artists.get.several.response" : {
"result" : {
"artists" : [ {
"genres" : [ ],
"id" : "artist-1",
"images" : [ ],
"name" : "Headliner"
}, {
"genres" : [ ],
"id" : "artist-2",
"images" : [ ],
"name" : "Support Act"
} ]
}
}
}
get artists albums
Request
{
"spotify.artists.albums" : "artist-id"
}
Example response
{
"spotify.artists.albums.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
} ]
}
},
"endpointId" : "test-endpoint-id"
}
get artists top tracks
Request
{
"spotify.artists.top-tracks" : "artist-id/top-tracks?market=US"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.artists.top-tracks.response" : {
"result" : {
"tracks" : [ {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-1",
"name" : "Main Hit"
}, {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-2",
"name" : "Deep Cut"
} ]
}
}
}
get artists related artists
Request
{
"spotify.artists.related" : "artist-id"
}
Example response
{
"spotify.artists.related.response" : {
"result" : {
"artists" : [ {
"genres" : [ ],
"id" : "artist-3",
"images" : [ ],
"name" : "Neighbor Band"
}, {
"genres" : [ ],
"id" : "artist-4",
"images" : [ ],
"name" : "Cousin Crew"
} ]
}
},
"endpointId" : "test-endpoint-id"
}
get an audiobook
Request
{
"spotify.audiobooks.get" : "audiobook-id"
}
Example response
{
"spotify.audiobooks.get.response" : {
"result" : {
"authors" : [ ],
"available_markets" : [ ],
"copyrights" : [ ],
"description" : null,
"html_description" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "audiobook-id",
"images" : [ ],
"languages" : [ ],
"media_type" : null,
"name" : "Sample Audiobook",
"narrators" : [ ],
"publisher" : null,
"type" : null,
"uri" : null,
"total_chapters" : null,
"chapters" : null
}
},
"endpointId" : "test-endpoint-id"
}
get several audiobooks
Request
{
"spotify.audiobooks.get.several" : "ids=book-1,book-2"
}
Example response
{
"spotify.audiobooks.get.several.response" : {
"result" : {
"audiobooks" : [ {
"authors" : [ ],
"available_markets" : [ ],
"copyrights" : [ ],
"description" : null,
"html_description" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "book-1",
"images" : [ ],
"languages" : [ ],
"media_type" : null,
"name" : "Morning Stories",
"narrators" : [ ],
"publisher" : null,
"type" : null,
"uri" : null,
"total_chapters" : null,
"chapters" : null
}, {
"authors" : [ ],
"available_markets" : [ ],
"copyrights" : [ ],
"description" : null,
"html_description" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "book-2",
"images" : [ ],
"languages" : [ ],
"media_type" : null,
"name" : "Evening Stories",
"narrators" : [ ],
"publisher" : null,
"type" : null,
"uri" : null,
"total_chapters" : null,
"chapters" : null
} ]
}
},
"endpointId" : "test-endpoint-id"
}
get audiobook chapters
Request
{
"spotify.audiobooks.chapters" : "audiobook-id"
}
Example response
{
"spotify.audiobooks.chapters.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"audio_preview_url" : null,
"available_markets" : [ ],
"chapter_number" : null,
"description" : null,
"html_description" : null,
"duration_ms" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "chapter-id",
"images" : [ ],
"is_playable" : null,
"languages" : [ ],
"name" : "Opening Chapter",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null
} ]
}
},
"endpointId" : "test-endpoint-id"
}
get users saved audiobooks
Request
{
"spotify.audiobooks.saved.get" : "limit=5"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.audiobooks.saved.get.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"audiobook" : {
"authors" : [ ],
"available_markets" : [ ],
"copyrights" : [ ],
"description" : null,
"html_description" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "audiobook-id",
"images" : [ ],
"languages" : [ ],
"media_type" : null,
"name" : "Sample Audiobook",
"narrators" : [ ],
"publisher" : null,
"type" : null,
"uri" : null,
"total_chapters" : null,
"chapters" : null
}
} ]
}
}
}
save audiobooks for current user
Request
{
"spotify.audiobooks.saved.save" : "[\"audiobook-id\"]"
}
Example response
{
"spotify.audiobooks.saved.save.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
remove users saved audiobooks
Request
{
"spotify.audiobooks.saved.remove" : "[\"audiobook-id\"]"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.audiobooks.saved.remove.response" : {
"result" : "OK"
}
}
check users saved audiobooks
Request
{
"spotify.audiobooks.saved.check" : "ids=audiobook-id"
}
Example response
{
"spotify.audiobooks.saved.check.response" : {
"result" : [ true ]
},
"endpointId" : "test-endpoint-id"
}
get several browse categories
Request
{
"spotify.categories.get" : "country=US"
}
Example response
{
"spotify.categories.get.response" : {
"result" : {
"categories" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"href" : null,
"icons" : [ ],
"id" : "category-id",
"name" : "Party Time"
}, {
"href" : null,
"icons" : [ ],
"id" : "category-2",
"name" : "Focus"
} ]
}
}
},
"endpointId" : "test-endpoint-id"
}
get single browse category
Request
{
"spotify.categories.get.single" : "category-id"
}
Example response
{
"spotify.categories.get.single.response" : {
"result" : {
"href" : null,
"icons" : [ ],
"id" : "category-id",
"name" : "Party Time"
}
},
"endpointId" : "test-endpoint-id"
}
get a chapter
Request
{
"spotify.chapters.get" : "chapter-id"
}
Example response
{
"spotify.chapters.get.response" : {
"result" : {
"audio_preview_url" : null,
"available_markets" : [ ],
"chapter_number" : null,
"description" : null,
"html_description" : null,
"duration_ms" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "chapter-id",
"images" : [ ],
"is_playable" : null,
"languages" : [ ],
"name" : "Opening Chapter",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"audiobook" : null
}
},
"endpointId" : "test-endpoint-id"
}
get several chapters
Request
{
"spotify.chapters.get.several" : "ids=chapter-1,chapter-2"
}
Example response
{
"spotify.chapters.get.several.response" : {
"result" : {
"chapters" : [ {
"audio_preview_url" : null,
"available_markets" : [ ],
"chapter_number" : null,
"description" : null,
"html_description" : null,
"duration_ms" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "chapter-1",
"images" : [ ],
"is_playable" : null,
"languages" : [ ],
"name" : "Introduction",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"audiobook" : null
}, {
"audio_preview_url" : null,
"available_markets" : [ ],
"chapter_number" : null,
"description" : null,
"html_description" : null,
"duration_ms" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "chapter-2",
"images" : [ ],
"is_playable" : null,
"languages" : [ ],
"name" : "Deep Dive",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"audiobook" : null
} ]
}
},
"endpointId" : "test-endpoint-id"
}
get episode
Request
{
"spotify.episodes.get" : "episode-id"
}
Example response
{
"spotify.episodes.get.response" : {
"result" : {
"audio_preview_url" : null,
"description" : null,
"html_description" : null,
"duration_ms" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "episode-id",
"images" : [ ],
"is_externally_hosted" : null,
"is_playable" : null,
"languages" : [ ],
"name" : "Sample Episode",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"show" : null
}
},
"endpointId" : "test-endpoint-id"
}
get several episodes
Request
{
"spotify.episodes.get.several" : "ids=episode-1,episode-2"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.episodes.get.several.response" : {
"result" : {
"episodes" : [ {
"audio_preview_url" : null,
"description" : null,
"html_description" : null,
"duration_ms" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "episode-1",
"images" : [ ],
"is_externally_hosted" : null,
"is_playable" : null,
"languages" : [ ],
"name" : "Chapter One",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"show" : null
}, {
"audio_preview_url" : null,
"description" : null,
"html_description" : null,
"duration_ms" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "episode-2",
"images" : [ ],
"is_externally_hosted" : null,
"is_playable" : null,
"languages" : [ ],
"name" : "Chapter Two",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"show" : null
} ]
}
}
}
get users saved episodes
Request
{
"spotify.episodes.saved.get" : "limit=1"
}
Example response
{
"spotify.episodes.saved.get.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"episode" : {
"audio_preview_url" : null,
"description" : null,
"html_description" : null,
"duration_ms" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "episode-id",
"images" : [ ],
"is_externally_hosted" : null,
"is_playable" : null,
"languages" : [ ],
"name" : "Sample Episode",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"show" : null
}
} ]
}
},
"endpointId" : "test-endpoint-id"
}
save episodes for current user
Request
{
"spotify.episodes.saved.save" : "[\"episode-id\"]"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.episodes.saved.save.response" : {
"result" : "OK"
}
}
remove users saved episodes
Request
{
"spotify.episodes.saved.remove" : "[\"episode-id\"]"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.episodes.saved.remove.response" : {
"result" : "OK"
}
}
check users saved episodes
Request
{
"spotify.episodes.saved.check" : "ids=episode-id"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.episodes.saved.check.response" : {
"result" : [ true ]
}
}
get available genre seeds
Request
{
"spotify.genres.seeds.get" : ""
}
Example response
{
"spotify.genres.seeds.get.response" : {
"result" : {
"genres" : [ "alternative", "samba" ]
}
},
"endpointId" : "test-endpoint-id"
}
transfer playback
Request
{
"spotify.player.transfer" : "{\"device_ids\":[\"device-id\"],\"play\":true}"
}
Example response
{
"spotify.player.transfer.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
seek to position
Request
{
"spotify.player.seek" : "position_ms=120000"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.player.seek.response" : {
"result" : "OK"
}
}
get recently played tracks
Request
{
"spotify.player.recently-played" : "limit=5"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.player.recently-played.response" : {
"result" : {
"items" : [ {
"track" : {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-id",
"name" : "Sample Track"
}
} ]
}
}
}
get the users queue
Request
{
"spotify.player.queue.get" : ""
}
Example response
{
"spotify.player.queue.get.response" : {
"result" : {
"currently_playing" : {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-id",
"name" : "Sample Track"
},
"queue" : [ {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-id",
"name" : "Sample Track"
} ]
}
},
"endpointId" : "test-endpoint-id"
}
add item to playback queue
Request
{
"spotify.player.queue.add" : "uri=spotify:track:track-id"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.player.queue.add.response" : {
"result" : "OK"
}
}
get playlist
Request
{
"spotify.playlists.get" : "playlist-id"
}
Example response
{
"spotify.playlists.get.response" : {
"result" : {
"id" : "playlist-id",
"images" : [ ],
"name" : "Sample Playlist"
}
},
"endpointId" : "test-endpoint-id"
}
change playlist details
Request
{
"spotify.playlists.change-details" : "playlist-id||{\"name\":\"Road Trip\"}"
}
Example response
{
"spotify.playlists.change-details.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
get playlist items
Request
{
"spotify.playlists.items.get" : "playlist-id/tracks?limit=10"
}
Example response
{
"spotify.playlists.items.get.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"track" : {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-1",
"name" : "Sample Track"
}
} ]
}
},
"endpointId" : "test-endpoint-id"
}
update playlist items
Request
{
"spotify.playlists.items.update" : "playlist-id||{\"uris\":[\"spotify:track:1\"]}"
}
Example response
{
"spotify.playlists.items.update.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
add items to playlist
Request
{
"spotify.playlists.items.add" : "playlist-id||{\"uris\":[\"spotify:track:1\"]}"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.playlists.items.add.response" : {
"result" : "OK"
}
}
remove playlist items
Request
{
"spotify.playlists.items.remove" : "playlist-id||{\"tracks\":[{\"uri\":\"spotify:track:1\"}]}"
}
Example response
{
"spotify.playlists.items.remove.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
get current users playlists
Request
{
"spotify.playlists.current-user.get" : "limit=5"
}
Example response
{
"spotify.playlists.current-user.get.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"id" : "playlist-1",
"images" : [ ],
"name" : "Daily Mix"
} ]
}
},
"endpointId" : "test-endpoint-id"
}
get users playlists
Request
{
"spotify.playlists.user.get" : "user-id/playlists?limit=5"
}
Example response
{
"spotify.playlists.user.get.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"id" : "playlist-2",
"images" : [ ],
"name" : "Road Trip"
} ]
}
},
"endpointId" : "test-endpoint-id"
}
create playlist
Request
{
"spotify.playlists.create" : "user-id||{\"name\":\"Chill\"}"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.playlists.create.response" : {
"result" : {
"id" : "playlist-id",
"images" : [ ],
"name" : "Chill"
}
}
}
get featured playlists
Request
{
"spotify.playlists.featured.get" : "country=US"
}
Example response
{
"spotify.playlists.featured.get.response" : {
"result" : {
"playlists" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"id" : "playlist-id",
"images" : [ ],
"name" : "Featured Picks"
} ]
}
}
},
"endpointId" : "test-endpoint-id"
}
get categories playlists
Request
{
"spotify.playlists.category.get" : "category-id/playlists?limit=10"
}
Example response
{
"spotify.playlists.category.get.response" : {
"result" : {
"playlists" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"id" : "playlist-id",
"images" : [ ],
"name" : "Category Mix"
} ]
}
}
},
"endpointId" : "test-endpoint-id"
}
get playlist cover image
Request
{
"spotify.playlists.cover.get" : "playlist-id"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.playlists.cover.get.response" : {
"result" : [ {
"url" : "https://image",
"height" : null,
"width" : null
} ]
}
}
add custom playlist cover image
Request
{
"spotify.playlists.cover.add" : "playlist-id||BASE64DATA"
}
Example response
{
"spotify.playlists.cover.add.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
search for item
Request
{
"spotify.search" : "type=track&q=hello"
}
Example response
{
"spotify.search.response" : {
"result" : {
"tracks" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-id",
"name" : "Hello World"
} ]
}
}
},
"endpointId" : "test-endpoint-id"
}
get show
Request
{
"spotify.shows.get" : "show-id"
}
Example response
{
"spotify.shows.get.response" : {
"result" : {
"available_markets" : [ ],
"copyrights" : [ ],
"description" : null,
"html_description" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "show-id",
"images" : [ ],
"is_externally_hosted" : null,
"languages" : [ ],
"media_type" : null,
"name" : "Sample Show",
"publisher" : null,
"type" : null,
"uri" : null,
"total_episodes" : null,
"episodes" : null
}
},
"endpointId" : "test-endpoint-id"
}
get several shows
Request
{
"spotify.shows.get.several" : "ids=show-1,show-2"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.shows.get.several.response" : {
"result" : {
"shows" : [ {
"available_markets" : [ ],
"copyrights" : [ ],
"description" : null,
"html_description" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "show-1",
"images" : [ ],
"is_externally_hosted" : null,
"languages" : [ ],
"media_type" : null,
"name" : "Morning Show",
"publisher" : null,
"type" : null,
"uri" : null,
"total_episodes" : null,
"episodes" : null
}, {
"available_markets" : [ ],
"copyrights" : [ ],
"description" : null,
"html_description" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "show-2",
"images" : [ ],
"is_externally_hosted" : null,
"languages" : [ ],
"media_type" : null,
"name" : "Night Show",
"publisher" : null,
"type" : null,
"uri" : null,
"total_episodes" : null,
"episodes" : null
} ]
}
}
}
get show episodes
Request
{
"spotify.shows.episodes" : "show-id/episodes?market=US"
}
Example response
{
"spotify.shows.episodes.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"audio_preview_url" : null,
"description" : null,
"html_description" : null,
"duration_ms" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "episode-id",
"images" : [ ],
"is_externally_hosted" : null,
"is_playable" : null,
"languages" : [ ],
"name" : "Pilot Episode",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null
} ]
}
},
"endpointId" : "test-endpoint-id"
}
get users saved shows
Request
{
"spotify.shows.saved.get" : "limit=3"
}
Example response
{
"spotify.shows.saved.get.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"show" : {
"available_markets" : [ ],
"copyrights" : [ ],
"description" : null,
"html_description" : null,
"explicit" : null,
"external_urls" : null,
"href" : null,
"id" : "show-id",
"images" : [ ],
"is_externally_hosted" : null,
"languages" : [ ],
"media_type" : null,
"name" : "Sample Show",
"publisher" : null,
"type" : null,
"uri" : null,
"total_episodes" : null
}
} ]
}
},
"endpointId" : "test-endpoint-id"
}
save shows for current user
Request
{
"spotify.shows.saved.save" : "[\"show-id\"]"
}
Example response
{
"spotify.shows.saved.save.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
remove users saved shows
Request
{
"spotify.shows.saved.remove" : "[\"show-id\"]"
}
Example response
{
"spotify.shows.saved.remove.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
check users saved shows
Request
{
"spotify.shows.saved.check" : "ids=show-id"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.shows.saved.check.response" : {
"result" : [ true ]
}
}
get track
Request
{
"spotify.tracks.get" : "track-id"
}
Example response
{
"spotify.tracks.get.response" : {
"result" : {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-id",
"name" : "Sample Track"
}
},
"endpointId" : "test-endpoint-id"
}
get several tracks
Request
{
"spotify.tracks.get.several" : "ids=track-1,track-2"
}
Example response
{
"spotify.tracks.get.several.response" : {
"result" : {
"tracks" : [ {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-1",
"name" : "First Track"
}, {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-2",
"name" : "Second Track"
} ]
}
},
"endpointId" : "test-endpoint-id"
}
get users saved tracks
Request
{
"spotify.tracks.saved.get" : "limit=1"
}
Example response
{
"spotify.tracks.saved.get.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"track" : {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-id",
"name" : "Sample Track"
}
} ]
}
},
"endpointId" : "test-endpoint-id"
}
save tracks for current user
Request
{
"spotify.tracks.saved.save" : "[\"track-id\"]"
}
Example response
{
"spotify.tracks.saved.save.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
remove users saved tracks
Request
{
"spotify.tracks.saved.remove" : "[\"track-id\"]"
}
Example response
{
"spotify.tracks.saved.remove.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
check users saved tracks
Request
{
"spotify.tracks.saved.check" : "ids=track-id"
}
Example response
{
"spotify.tracks.saved.check.response" : {
"result" : [ true ]
},
"endpointId" : "test-endpoint-id"
}
get several tracks audio features
Request
{
"spotify.tracks.audio-features.get.several" : "ids=track-1,track-2"
}
Example response
{
"spotify.tracks.audio-features.get.several.response" : {
"result" : {
"audio_features" : [ {
"id" : "track-1",
"tempo" : 120.0
}, {
"id" : "track-2",
"tempo" : 128.0
} ]
}
},
"endpointId" : "test-endpoint-id"
}
get tracks audio features
Request
{
"spotify.tracks.audio-features.get" : "track-id"
}
Example response
{
"spotify.tracks.audio-features.get.response" : {
"result" : {
"id" : "track-id",
"tempo" : 123.0
}
},
"endpointId" : "test-endpoint-id"
}
get tracks audio analysis
Request
{
"spotify.tracks.audio-analysis.get" : "track-id"
}
Example response
{
"spotify.tracks.audio-analysis.get.response" : {
"result" : {
"bars" : [ ],
"beats" : [ ],
"sections" : [ ],
"segments" : [ ],
"tatums" : [ ]
}
},
"endpointId" : "test-endpoint-id"
}
get recommendations
Request
{
"spotify.tracks.recommendations" : "seed_tracks=track-1"
}
Example response
{
"spotify.tracks.recommendations.response" : {
"result" : {
"seeds" : [ ],
"tracks" : [ {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-1",
"name" : "First Track"
} ]
}
},
"endpointId" : "test-endpoint-id"
}
get current users profile
Request
{
"spotify.users.current.get" : ""
}
Example response
{
"spotify.users.current.get.response" : {
"result" : {
"display_name" : "Sample User",
"id" : "user-id",
"images" : [ ]
}
},
"endpointId" : "test-endpoint-id"
}
get users top items
Request
{
"spotify.users.top-items" : "tracks?limit=5"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.users.top-items.response" : {
"result" : {
"href" : null,
"limit" : null,
"next" : null,
"offset" : null,
"previous" : null,
"total" : null,
"items" : [ {
"album" : {
"album_type" : null,
"total_tracks" : null,
"available_markets" : [ ],
"external_urls" : null,
"href" : null,
"id" : "album-id",
"images" : [ ],
"name" : "Sample Album",
"release_date" : null,
"release_date_precision" : null,
"type" : null,
"uri" : null,
"artists" : [ ]
},
"artists" : [ {
"id" : "artist-id",
"name" : "Sample Artist"
} ],
"available_markets" : [ ],
"id" : "track-id",
"name" : "Top Track"
} ]
}
}
}
get users profile
Request
{
"spotify.users.get" : "user-id"
}
Example response
{
"spotify.users.get.response" : {
"result" : {
"display_name" : "Public User",
"id" : "user-id",
"images" : [ ]
}
},
"endpointId" : "test-endpoint-id"
}
follow playlist
Request
{
"spotify.users.playlists.follow" : "playlist-id||{\"public\":false}"
}
Example response
{
"spotify.users.playlists.follow.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
unfollow playlist
Request
{
"spotify.users.playlists.unfollow" : "playlist-id"
}
Example response
{
"spotify.users.playlists.unfollow.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
get followed artists
Request
{
"spotify.users.followed-artists" : "type=artist&limit=5"
}
Example response
{
"spotify.users.followed-artists.response" : {
"result" : {
"artists" : {
"items" : [ {
"genres" : [ ],
"id" : "artist-id",
"images" : [ ],
"name" : "Followed Artist"
} ]
}
}
},
"endpointId" : "test-endpoint-id"
}
follow artists or users
Request
{
"spotify.users.follow" : "type=artist&ids=artist-id"
}
Example response
{
"spotify.users.follow.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
unfollow artists or users
Request
{
"spotify.users.unfollow" : "type=user&ids=user-id"
}
Example response
{
"spotify.users.unfollow.response" : {
"result" : "OK"
},
"endpointId" : "test-endpoint-id"
}
check if user follows artists or users
Request
{
"spotify.users.follow.check" : "type=artist&ids=artist-id"
}
Example response
{
"endpointId" : "test-endpoint-id",
"spotify.users.follow.check.response" : {
"result" : [ false ]
}
}
check if current user follows playlist
Request
{
"spotify.users.playlists.follow.check" : "playlist-id/followers/contains?ids=user-id"
}
Example response
{
"spotify.users.playlists.follow.check.response" : {
"result" : [ true ]
},
"endpointId" : "test-endpoint-id"
}