---
title: "setPlayModes"
method: POST
path: "/groups/{groupId}/playback/playMode"
tags: ["playback"]
---

# setPlayModes

`POST /groups/{groupId}/playback/playMode`

Use the setPlayModes command in the playback namespace to change group play modes, such as repeat, repeat one track, shuffle, and crossfade. See Play Modes for details.

 Configure a play mode in the playModes array by adding a “true” or “false” value for the mode, or omit a play mode to leave it unchanged.

## Request body

- object
  - `playModes` PlayMode, required — This argument only applies to content that uses the shared queue. If playModes.shuffle is null or omitted, the current shuffle mode of the player will be retained and respected. If playModes.shuffle is true, the new tracks will be shuffled when added to the shared queue. The shared queue's shuffle mode will be turned on if it is not already on. If playModes.shuffle is false, the shuffle mode on the player will be turned off and the tracks will be added in their normal order. This applies for each of the play modes individually, which are not mutually exclusive with each other.
    - `repeat` boolean, nullable — Repeat tracks. When playback reaches the end of the current queue of tracks, playback will wrap around and continue from the beginning of the queue.
    - `repeatOne` boolean, nullable — Repeat the current track indefinitely until this mode is disabled or your app explicitly changes the playhead position to a different track, for example, by skipping to the next track, a previous track, or a specific track in a cloud queue.
    - `shuffle` boolean, nullable — Play the tracks in the queue in a randomly shuffled order.
    - `crossfade` boolean, nullable — Fade out and mix the end of a track with the start of the next track as it is being faded in, creating a crossfade effect.

## Response `200`

Request was successful.

## Other responses

- `400` — The given resource/object identifier is invalid
- `401` — A client has not provided authorization credentials to perform a command
- `403` — A client does not have the correct permissions to perform a command
- `404` — See the x-muse-error-codes extension for a list of muse errors that generate this response
- `499` — Indicates there was an error occurred when performing a command
- `500` — Sonos has experience an unexpected condition it is unable to recover from
- `503` — Player is unable to reach the service.

---

[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)
