GET/BOAR
Health check used before the app saves a custom server host.
Response
I am BOAR!
The body must equal I am BOAR! after trimming whitespace.
The requests, responses, and behavior needed to build a server compatible with the BOAR app.
The app stores only a host name, then builds requests as https://{host}/{path}.
Custom servers must be reachable over HTTPS at the root of the host. A path prefix such as
https://example.com/boar/ is not supported by the app.
X-BOAR-Member-ID; room writes include member_id in their body. Do not require additional credentials that the app cannot provide.null..m4a is recommended./BOARHealth check used before the app saves a custom server host.
I am BOAR!
The body must equal I am BOAR! after trimming whitespace.
BOAR does not require a specific backend implementation. A compatible server may proxy YouTube Music, redirect to YouTube Music, or produce compatible JSON itself. What matters is the request and response shape seen by the app.
/v1/searchSearches artists or songs. The app sends a YouTube Music InnerTube-style JSON request.
{
"context": {
"client": {
"clientName": "WEB_REMIX",
"clientVersion": "1.20251111.09.00"
}
},
"query": "search text",
"params": "..."
}
Return a successful YouTube Music search-compatible JSON response. A 307
redirect that preserves the original POST body is also compatible if the final response is
the YouTube Music JSON.
/v1/browseFetches artist pages, album pages, release shelves, and lyrics pages.
{
"context": {
"client": {
"clientName": "WEB_REMIX",
"clientVersion": "1.20251111.09.00"
}
},
"browseId": "MPREb_...",
"params": "optional"
}
Return a successful YouTube Music browse-compatible JSON response for the requested
browseId. The app extracts artist metadata, album lists, album tracks, video
IDs, thumbnails, and lyrics from this response.
/playlist/{playlist_id}Returns lightweight metadata for a YouTube playlist without returning audio bytes.
{
"playlist_id": "PL...",
"entries": [
{
"id": "youtubeVideoId",
"title": "Song title",
"channel": "Artist or channel",
"thumbnail": "https://..."
}
],
"count": 1,
"queued": false,
"cached": false
}
playlist_id and entries are required. Each entry must include
id. The app can tolerate missing title, channel,
and thumbnail, but providing them gives better imported metadata.
/queue/{playlist_id}
Optional preload hint. The app calls this after opening an album when a playlist ID is
known. Return 200 with any JSON body.
{
"playlist_id": "PL...",
"queued": true
}
/{playlist_id}/{index}
Returns the playable audio file for a playlist entry. index is zero-based and
follows the server playlist order. Prefer /video/{video_id} when a video ID is known; an album listing can differ from playlist order.
Audio file bytes with a successful HTTP status.
/video/{video_id}Returns the playable audio file for a single YouTube video ID.
Audio file bytes with a successful HTTP status.
/cache/has?video_id={video_id}
Tells the app whether server-side audio for a video ID can be reused in a listening room or Shared Library.
If your server does not support reusable cached audio, return {"cached": false}.
{"cached": true}
/cover/has?video_id={video_id}&cover_hash={sha1}
Tells the app whether a cover image is already available on the server. At least one query
parameter should be accepted. If your server does not support reusable cached covers, return
{"cached": false}.
{"cached": true}
Listening rooms use server-authoritative playback state. The app joins a room, receives a
member_id, uploads or references tracks, repeatedly syncs room state, and
downloads room audio from URLs supplied by the server.
member_id on join.RoomSnapshot from state-changing room endpoints unless documented otherwise.state.track_id aligned with queue[state.queue_index] whenever the queue is non-empty.state.version when playback state, membership, tracks, queue, or chat changes.server_time in snapshots when possible so clients can estimate clock offset./roomsLists public active rooms.
{"rooms": [RoomSummary]}
/rooms/version/check
Checks whether the current app build may use listening rooms. To allow the app, return
ok: true.
{"build": 42}
{
"ok": true,
"build": 42,
"min_build": null
}
/rooms/version
Legacy fallback used only if /rooms/version/check is unavailable or unusable.
Implementing /rooms/version/check is enough for current app builds.
{"min_version": "1.0"}
/roomsCreates a room; creating does not join it. Optional library_locked: true
selects a single-library private room, with optional library_name.
Send library_loading: true while its creator is still contributing songs.
Public rooms ignore library locking. A locked-room creation response includes a secret
creator_token; supply it when the creator joins. Do not share that token with guests.
{
"name": "Friday Night",
"public": false,
"library_locked": false,
"library_name": null
}
{
"code": "123456",
"name": "Friday Night",
"public": false,
"library_locked": false,
"library_name": null
}
/rooms/{code}/joinJoins a room and returns the current snapshot plus the caller's member_id.
{"member_name": "Listener", "creator_token": "optional-token-from-create"}
Guests omit creator_token. Only a member joined with the valid creator token can upload to a locked library room or finish its loading phase.
RoomSnapshot with "member_id"
/rooms/{code}/leaveRemoves the member. For a single-library room, close the room when its library owner
leaves. Return 404 on subsequent sync requests so remaining listeners exit
playback. Return whether the member was removed and whether the room was deleted.
{"member_id": "member-id"}
{
"left": true,
"room_deleted": false
}
/rooms/{code}/heartbeatRefreshes member presence without returning a full snapshot.
{"member_id": "member-id"}
{"ok": true}
/rooms/{code}/sync?since={version}
Requires X-BOAR-Member-ID (the legacy member_id query parameter
is also accepted). Refreshes member presence. since is an optional nonnegative
revision: return 204 with no body when it matches the current revision;
otherwise return a snapshot. An older or newer supplied revision receives the current snapshot.
RoomSnapshot
/rooms/{code}/tracksRequires the member header. Returns metadata for tracks in the current queue and queue order, not necessarily every song retained by the room.
{
"tracks": [RoomTrack],
"queue": ["track-id"]
}
/rooms/{code}/upload
Uploads one playable audio file to a room. This endpoint uses
multipart/form-data.
| Field | Required | Value |
|---|---|---|
member_id | Yes | Room member ID. |
metadata | No | JSON text matching UploadTrackMetadata. |
file | Yes | Playable audio with a matching extension and MIME type: audio/mp4 for m4a/mp4, audio/mpeg for mp3, or audio/aac for aac. |
cover | No | JPEG cover image. |
RoomSnapshot with "added_track_id" and "added"
/rooms/{code}/add_cached
Adds server-cached audio to a room without uploading audio bytes. If you return
{"cached": false} from /cache/has, the app will normally use
/upload instead.
{
"member_id": "member-id",
"video_id": "youtubeVideoId",
"metadata": UploadTrackMetadata
}
RoomSnapshot with "added_track_id" and "added"
If the audio exists but the requested cover does not, return 412 so the app
can fall back to /upload.
/rooms/{code}/stateUpdates synchronized playback state. client_version is the last revision
seen by the client; return the authoritative snapshot after handling the request.
The current app sends next for skipping and disables previous-song skips.
position is seconds into the track and playback_rate is a speed
multiplier. client_time is the client's Unix timestamp;
server_time_offset estimates server time minus client time. These fields allow
you to account for transit time when applying a playing position.
Shuffle visits every known unplayed track before starting another cycle. Skipping counts
the current track as visited. Explicit track selections may replay songs. A library room
that exhausts its upload buffer pauses with waiting_for_library: true rather
than restarting. The creator sends {"member_id":"member-id","library_loading":false}
only after all contributions succeed. Accept repeated completion requests without restarting playback. Only wait for completion when
library_loading: true was supplied at creation.
| Field | Type | Required |
|---|---|---|
member_id | string | Yes |
client_version | integer | No |
command | next or previous | No |
track_id | string | No |
queue_index | integer | No |
status | playing or paused | No |
position | number | No |
playback_rate | number | No |
lyrics_open | boolean | No |
library_loading | false, creator completion only | No |
client_time | number | No |
server_time_offset | number | No |
RoomSnapshot
/rooms/{code}/force_trackStarts playback of an existing room track. If the track is not already in the queue, append it or otherwise make it the current queue item.
{
"member_id": "member-id",
"track_id": "track-id",
"position": 0,
"playback_rate": 1.0,
"status": "playing",
"client_time": 1767311999.95,
"server_time_offset": 0.12,
"client_version": 5
}
RoomSnapshot
/rooms/{code}/replace_current
Replaces the current queue item with an existing room track. BOAR uses this for private
rooms. Public rooms may reject it with 403.
{
"member_id": "member-id",
"track_id": "track-id",
"position": 0,
"playback_rate": 1.0,
"status": "playing",
"client_time": 1767311999.95,
"server_time_offset": 0.12,
"client_version": 5
}
RoomSnapshot
/rooms/{code}/chatAdds a chat message and returns recent chat messages.
{
"member_id": "member-id",
"text": "hello"
}
{"chat": [RoomMessage]}
/rooms/{code}/track/{track_id}Returns the playable room audio file for a track. Send the member header; the member must still belong to the room. The legacy member query parameter is also accepted.
Audio file bytes with a successful HTTP status.
/rooms/{code}/cover/{track_id}
Requires the member header (or legacy member query parameter). Returns a JPEG cover image for a track. If cover_url is present in
RoomTrack, this URL should return bytes beginning with JPEG magic bytes.
JPEG file bytes with a successful HTTP status, or 404 if no cover exists.
/video/{video_id}/metadata{"video_id":"youtubeVideoId","title":"Song title","artists":["Artist"],"album":null,"thumbnail_url":"https://...","duration":214.2}
Fetches display metadata without returning audio. Unavailable metadata returns 404.
/reportReceives feedback as a plain-text request body. Return a successful HTTP status after accepting the message; the app does not require a particular response body.
{
"code": "123456",
"name": "Friday Night",
"public": true,
"members": 3,
"tracks": 12,
"current_track_title": "Track title",
"current_track_artist": "Artist name"
}
code, name, public, members, and
tracks are required. Current track fields may be null.
{
"room": RoomInfo,
"state": RoomState,
"queue": ["track-id"],
"tracks": [RoomTrack],
"members": [RoomMember],
"chat": [RoomMessage],
"server_time": 1767312000.456,
"member_id": "member-id",
"added_track_id": "track-id",
"added": true
}
room, state, queue, tracks, and
members are required. member_id is needed in the join response.
added_track_id and added are needed in upload/add-cached
responses. chat and server_time are recommended in every
snapshot.
{
"code": "123456",
"name": "Friday Night",
"public": false,
"library_locked": false,
"library_name": null
}
{
"version": 5,
"status": "playing",
"playback_rate": 1.0,
"lyrics_open": false,
"track_id": "track-id",
"queue_index": 0,
"position": 42.35,
"updated_at": 1767312000.123,
"rewind_floor_index": 0,
"waiting_for_library": false
}
track_id may be null or absent for an empty room. rewind_floor_index and waiting_for_library are optional. Other fields shown are required. Use
status: "playing" or "paused". position is seconds.
{
"id": "track-id",
"title": "Song title",
"artist": "Artist",
"duration": 214.2,
"owner_id": "member-id",
"size": 3456789,
"hash": "content-hash",
"lyrics": LyricsInfo,
"download_url": "/rooms/123456/track/track-id",
"cover_url": "/rooms/123456/cover/track-id"
}
id, title, and download_url are required.
artist, duration, owner_id, size,
hash, lyrics, and cover_url may be
null or omitted when unavailable.
{
"id": "member-id",
"name": "Listener"
}
{
"id": "message-id",
"member_id": "member-id",
"member_name": "Listener",
"text": "hello",
"timestamp": 1767312000.123
}
{
"title": "Song title",
"artist": "Artist",
"duration": 214.2,
"video_id": "youtubeVideoId",
"cover_hash": "sha1-of-cover-bytes",
"lyrics": LyricsInfo
}
The app always sends title. Other fields may be null or absent.
{
"status": "available",
"text": "Lyrics text",
"source": "embedded"
}
status must be available or notAvailable. For
unavailable lyrics, use {"status":"notAvailable","text":null,"source":null}
or omit the whole lyrics field.
| Status | Meaning |
|---|---|
| 200 | Successful JSON or file response. |
| 204 | Room or Shared Library revision is unchanged; no response body. |
| 307 | Allowed for search/browse redirects when the original POST body is preserved. |
| 400 | Missing or invalid required field. |
| 403 | Member is missing from a room or the action is not allowed. |
| 404 | Room, track, playlist, video, cover, or cached file not found. |
| 412 | Cached audio exists but the requested cached cover is missing. |
| 429 | Rate limit exceeded. |
| 500 | Unexpected server failure. |
Use a non-success HTTP status for failures. A JSON body such as
{"description":"Room expired."} lets the app display a useful message.
Room sync 404 is terminal: the app exits the room. Temporary network failures retry.