---
title: "setVolume"
method: POST
path: "/players/{playerId}/playerVolume"
tags: ["playerVolume"]
---

# setVolume

`POST /players/{playerId}/playerVolume`

Use the setVolume command to set the player's volume and mute state.

 Returns an empty body with a success value of true if successful. The player generates a playerVolume event if the volume was changed.
 Additionally, if setVolume is called on a player that has a fixed player volume state that is true, the command will fail and you will receive an ERROR_COMMAND_FAILED globalError. This is because players with fixed volumes cannot be changed, for example, a CONNECT with fixed line out would respond with this error if your app tried to set the volume on it.

## Request body

- object
  - `volume` integer, nullable — (Optional) Between 0 and 100. Values above this range will be rejected. Any negative value will be interpreted as setting the volume level to 0.
  - `muted` boolean, nullable — (Optional) True to mute the player or false to unmute the player. If not specified, the existing mute state is maintained.

## Response `200`

See the x-muse-error-codes extension for a list of muse errors that generate this response

- Ok — This object represents an empty (default) success. The platform returns an empty object ({}).

## Other responses

- `400` — See the x-muse-error-codes extension for a list of muse errors that generate this response
- `401` — See the x-muse-error-codes extension for a list of muse errors that generate this response
- `403` — See the x-muse-error-codes extension for a list of muse errors that generate this response
- `404` — See the x-muse-error-codes extension for a list of muse errors that generate this response
- `499` — See the x-muse-error-codes extension for a list of muse errors that generate this response
- `500` — See the x-muse-error-codes extension for a list of muse errors that generate this response
- `503` — See the x-muse-error-codes extension for a list of muse errors that generate this response

---

[API](https://skmtc.net/sonos/apis/authorization-api.md) · [All operations](https://skmtc.net/sonos/apis/authorization-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sonos/authorization-api/versions/243132628620/schema)
