groupVolume

setRelativeVolume

Use the setRelativeVolume command to increase or decrease group volume and set the group's mute state. The group is automatically unmuted unless otherwise specified.

Your app can use setRelativeVolume instead of setVolume when the user intent is to increase or decrease the group volume, but not to set the final volume to a particular value. For example, your app should use setRelativeVolume when the user presses hard volume plus/minus buttons on a mobile device.

The group will automatically limit the final volume set within the valid range, so your app does not need to worry about that.

If every player in the group has a fixed player volume state that is true, the command will fail and you will receive an ERROR_COMMAND_FAILED globalError, as with setVolume.

See setVolume for more details on how group volume works.

post/groups/{groupId}/groupVolume/relative

Request

  • Base URL
    https://api.ws.sonos.com/control/api/v1
  • URL
    https://api.ws.sonos.com/control/api/v1/groups/{groupId}/groupVolume/relative
  • Auth
    OAuth 2 and HTTP bearer and API key in header X-Sonos-Api-Key
    Authorization code: https://api.sonos.com/login/v3/oauth
    Token URL: https://api.sonos.com/login/v3/oauth/access scopes: playback-control-all

Request body

volumeDeltainteger required

An integer between -100 and 100 (including those values) indicating the amount to increase or decrease the current group volume. The group coordinator adds this value to the current group volume and then keeps the result in the range of 0 to 100.

Response

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

Ok required

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

Changes

No recorded changes to this operation across all 1 revision of this API.