ReferenceAPI Reference
API Reference
10 MIN READLast updated: todayv0.6.36
Vynl exposes a REST API at
/api/*. Same surface the web UI uses. No authentication required on the local network (assumes you're firewalling Vynl to trusted clients).
Status: OUTLINE — full reference + curl examples to be filled in. This file lists every endpoint by area; details for each come in a follow-up pass.
Conventions
- Base URL:
http://your-vynl-host:3101 - Content-Type:
application/jsonon POST/PUT - Errors: JSON with
{ "error": "...", "details": "..." }and an HTTP status - All timestamps are ISO 8601 in UTC
Endpoints by area
Library
GET /api/albums— list albums (filterable, sortable, since-window)GET /api/albums/[id]— single album with tracksPOST /api/albums/cover-update— set album cover from image URLPOST /api/albums/cover-search— search cover providersPOST /api/albums/rename— rename album + album artistGET /api/tracks/[id]— single trackPUT /api/tracks/[id]/rating— set 1-5 star ratingDELETE /api/tracks/[id]/rating— clear ratingGET /api/library/duplicates— find duplicatesPOST /api/library/scan— trigger full scanPOST /api/library/analyze-tracks— audio feature analysis (BPM/energy)GET /api/library/watcher— file watcher statusPUT /api/library/watcher— save watcher configPOST /api/library/watcher— start watcherDELETE /api/library/watcher— stop watcher
Playlists
GET /api/playlists— listPOST /api/playlists— createGET /api/playlists/[id]— single playlist with tracksPUT /api/playlists/[id]— update name/description/sectionDELETE /api/playlists/[id]— delete (will route through FireStorage in v0.7)POST /api/playlists/generate— AI-generated playlist from promptPOST /api/playlists/auto-generate— auto-generated mood/era playlists
Discovery
POST /api/discover/session— start discovery sessionGET /api/discover/samples— get next batch of sample tracksPOST /api/discover/feedback— submit like/dislike feedback
Player
GET /api/audio/[...path]— stream audio file by pathPOST /api/listening-history— record a playGET /api/listening-history— read play history
Sonos
GET /api/sonos/devices— discovered speakersPOST /api/sonos/play— play track on roomPOST /api/sonos/pausePOST /api/sonos/group
Podcasts
GET /api/podcasts— list subscribed podcastsPOST /api/podcasts— subscribe to a feed URLGET /api/podcasts/[id]— podcast with episodesDELETE /api/podcasts/[id]— unsubscribe (will route through FireStorage)GET /api/podcasts/[id]/episodes/[episodeId]— episode detailPOST /api/podcasts/[id]/episodes/[episodeId]/download— download for offline
Spotify Migration
POST /api/spotify/auth— kick off OAuthGET /api/spotify/callback— OAuth callbackGET /api/spotify/status— connection statePOST /api/spotify/migration/sync— start safe-phases syncGET /api/spotify/migration/snapshot— current snapshot summaryGET /api/spotify/migration/playlists— Spotify playlists in snapshotGET /api/spotify/migration/tracks— tracks (joined with match state)POST /api/spotify/migration/wishlist— bulk-add to wishlistPOST /api/spotify/migration/download— spotDL downloadPOST /api/spotify/migration/create-playlist— mirror as Vynl playlistDELETE /api/spotify— disconnect + wipe
Wishlist
GET /api/wishlist— list itemsPOST /api/wishlist— add itemDELETE /api/wishlist— bulk delete (will route through FireStorage)
Lidarr
POST /api/lidarr/push— push wishlist items to Lidarr
Settings
GET /api/settings/keys— list API key keys (values redacted)POST /api/settings/keys— set a key/valueDELETE /api/settings/keys— clear a key (falls back to env)
FireStorage (v0.7+)
GET /api/firestorage— list held entriesPOST /api/firestorage/[id]/restore— instant restorePOST /api/firestorage/[id]/purge— hard delete (2FA required once available)
Covers / images
GET /api/covers/[filename]— serve album cover by hash filenameGET /api/artist-images/[filename]— serve artist image
Stats
GET /api/stats/overview— track/album/artist counts, top genres, listening totals
Next steps for this doc
- Add request/response schemas for each endpoint
- Add curl examples for the 20 most-used endpoints
- Add OpenAPI / Swagger generation from route handlers
- Add rate-limit notes where applicable
