POST /api/djconnect/v1/status
Used by ESP32/local clients to publish current device status to Home Assistant. Auth: bearer device token.
{"client_type":"esp32","device_id":"<DEVICE_ID>","firmware_version":"3.2.16","battery_percent":84}
{"success":true,"paired":true,"server_time":"2026-07-05T08:00:00Z"}
POST /api/djconnect/v1/command
Used by app/device clients for playback, backend-aware actions, Ask DJ Play Now and confirmation responses. Auth: bearer HA/client token.
{"client_type":"ios","client_id":"<CLIENT_ID>","command":"play_track","value":"spotify:track:example"}
{"success":true,"music_backend":"spotify_direct","music_backend_available":true,"music_target_player":"Living Room"}
POST /api/djconnect/v1/voice
Used for voice/PTT upload or text-only DJ response tests. WAV requests use Assist/STT before command or Ask DJ handling. Auth: bearer HA/client token.
{"client_type":"macos","client_id":"<CLIENT_ID>","text":"Play the latest album by Nova Lane"}
{"success":true,"recognized_text":"Play the latest album by Nova Lane","message":"I found a matching album."}
POST /api/djconnect/v1/ask_dj/message
Text chat for iOS, macOS, watchOS, Raspberry Pi and Windows. client_message_id deduplicates retries. Auth: bearer HA/client token.
{"client_type":"watchos","client_id":"<CLIENT_ID>","client_message_id":"msg-001","message":"Why does this track fit my mood?"}
{"success":true,"messages":[{"role":"user","text":"Why does this track fit my mood?"},{"role":"assistant","text":"Because it matches your recent late-night groove."}],"history_revision":42}
GET /api/djconnect/v1/ask_dj/history?since_revision=<number>
Synchronizes server-side HA-user-scoped Ask DJ history to clients. Auth: bearer HA/client token.
{"success":true,"history_revision":42,"messages":[{"role":"assistant","text":"Try a mellow synth mix."}]}
POST /api/djconnect/v1/ask_dj/history/clear
Clears Ask DJ history for the authenticated Home Assistant user scope. Auth: bearer HA/client token.
{"client_type":"macos","client_id":"<CLIENT_ID>"}
{"success":true,"clear_revision":43}
POST /api/djconnect/v1/ask_dj
Developer/service Ask DJ entrypoint for structured requests. Auth: Home Assistant authenticated request.
{"message":"Suggest three quiet tracks","client_type":"macos"}
{"success":true,"text":"Here are three quiet picks.","intent":"personal_music_recommendations"}
POST /api/djconnect/v1/ask_dj/idle_suggestion
Backend-generated Ask DJ suggestion for idle clients that support it. Auth: bearer HA/client token.
{"client_type":"ios","client_id":"<CLIENT_ID>","locale":"en"}
{"success":true,"message":"Want a short discovery mix?"}
POST /api/djconnect/v1/music_dna/profile
Returns structured Music DNA dashboard/profile data. Music DNA is explicit opt-in. Auth: bearer HA/client token.
{"client_type":"ios","client_id":"<CLIENT_ID>"}
{"success":true,"enabled":true,"profile":{"summary":"Warm electronic listening pattern."}}
POST /api/djconnect/v1/music_dna/settings
Enables or disables Music DNA for the HA user scope. Auth: bearer HA/client token.
{"client_type":"macos","enabled":true}
{"success":true,"enabled":true}
POST /api/djconnect/v1/music_dna/clear
Clears learned Music DNA while preserving the opt-in setting. Auth: bearer HA/client token.
{"client_type":"macos","confirm":true}
{"success":true,"enabled":true,"cleared":true}
GET /api/djconnect/v1/music_discovery
Returns backend-owned Music Discovery recommendations from Home Assistant Music DNA. Auth: bearer HA/client token.
{"client_type":"ios","client_id":"<CLIENT_ID>"}
{"success":true,"enabled":true,"sections":[{"id":"daily","items":[{"id":"rec-001","kind":"track","title":"Midnight Circuit","reason":"Fits your recent late-night groove."}]}]}
POST /api/djconnect/v1/music_discovery/refresh
Refreshes the Home Assistant-generated discovery feed; clients never render recommendations from push payloads. Auth: bearer HA/client token.
{"client_type":"macos","client_id":"<CLIENT_ID>"}
{"success":true,"refresh_target":"music_discovery"}
POST /api/djconnect/v1/music_discovery/play
Starts a backend-owned recommendation through its section and item id, instead of generic local playback. Auth: bearer HA/client token.
{"client_type":"ios","section_id":"daily","discovery_item_id":"rec-001"}
{"success":true,"command":"play_now"}
GET /api/djconnect/v1/image_proxy/{token}
Serves external Ask DJ images through a safe proxy token. Auth: endpoint token plus Home Assistant access context.
GET /api/djconnect/v1/image_proxy/<IMAGE_TOKEN>
HTTP 200 image/jpeg
Local device API
Home Assistant uses local-device endpoints for ESP32/Raspberry Pi pairing, commands, OTA and DJ responses. Auth varies by pairing state and device bearer token.
POST /api/device/pair
GET /api/device/info
POST /api/device/command
POST /api/device/ota
POST /api/device/dj_response
{"pairing_code":"<PAIRING_CODE>","device_token":"<DEVICE_TOKEN>"}