Skip to main content

Get Players

Retrieve all players for a specific session.
GET /v4/sessions/{sessionId}/players

Path Parameters

sessionId
string
required
The session ID from the WebSocket ready event

Response

Returns an array of player objects.
players
array
required
Array of player objects, each containing:
curl -X GET 'http://localhost:2333/v4/sessions/xtaug914v9k5032f/players' \
  -H 'Authorization: youshallnotpass'

Get Player

Retrieve a specific player by guild ID.
GET /v4/sessions/{sessionId}/players/{guildId}

Path Parameters

sessionId
string
required
The session ID from the WebSocket ready event
guildId
string
required
The Discord guild ID

Response

Returns a player object (same structure as Get Players array item).
curl -X GET 'http://localhost:2333/v4/sessions/xtaug914v9k5032f/players/817327181659111454' \
  -H 'Authorization: youshallnotpass'

Update Player

Update or create a player. Use this to play tracks, control playback, adjust volume, apply filters, and manage voice connections.
PATCH /v4/sessions/{sessionId}/players/{guildId}?noReplace=false

Path Parameters

sessionId
string
required
The session ID from the WebSocket ready event
guildId
string
required
The Discord guild ID

Query Parameters

noReplace
boolean
default:"false"
If true, the current track will not be replaced if a new track is provided. Defaults to false.

Request Body

All fields are optional. Only include fields you want to update.
track
object
The track to play
position
integer
The track position in milliseconds to seek to
endTime
integer
The track end time in milliseconds (must be > 0). Use null to reset.
volume
integer
The player volume (0-1000, where 100 is 100%)
paused
boolean
Whether to pause the player
filters
object
Audio filters to apply. This completely replaces all previously applied filters.
voice
object
Voice connection information from Discord
Deprecated Fields:
  • encodedTrack (use track.encoded instead)
  • identifier (use track.identifier instead)
These fields are mutually exclusive with the new track object and will be removed in a future version.

Response

Returns the updated player object.
curl -X PATCH 'http://localhost:2333/v4/sessions/xtaug914v9k5032f/players/817327181659111454' \
  -H 'Authorization: youshallnotpass' \
  -H 'Content-Type: application/json' \
  -d '{
    "track": {
      "encoded": "QAAAjQIAJVJpY2sgQXN0bGV5..."
    }
  }'

Destroy Player

Destroy a player and disconnect from the voice channel.
DELETE /v4/sessions/{sessionId}/players/{guildId}

Path Parameters

sessionId
string
required
The session ID from the WebSocket ready event
guildId
string
required
The Discord guild ID

Response

Returns 204 No Content on success.
curl -X DELETE 'http://localhost:2333/v4/sessions/xtaug914v9k5032f/players/817327181659111454' \
  -H 'Authorization: youshallnotpass'

Equalizer Bands Reference

The equalizer has 15 bands (0-14) with the following frequencies:
BandFrequency
025 Hz
140 Hz
263 Hz
3100 Hz
4160 Hz
5250 Hz
6400 Hz
7630 Hz
81000 Hz
91600 Hz
102500 Hz
114000 Hz
126300 Hz
1310000 Hz
1416000 Hz
Gain values range from -0.25 (muted) to 1.0 (doubled). A value of 0 is the default with no modification.

Build docs developers (and LLMs) love