---
title: "loadFavorite"
method: POST
path: "/groups/{groupId}/favorites"
tags: ["favorites"]
---

# loadFavorite

`POST /groups/{groupId}/favorites`

The loadFavorite command in the favorites namespace activates a favorite within the default playback session. This command interrupts any active private playback sessions. Sonos adds album, tracklist, and track favorites to the queue and activates the queue. This prevents your app from overwriting user-curated queues.

## Request body

- object
  - `favoriteId` string, required — The identifier of the favorite. You can find this in the favoriteList object in the getFavorites response.
  - `action` 'REPLACE' | 'APPEND' | 'INSERT' | 'INSERT_NEXT' | 'PLAY_NOW' — No description available
  - `playModes` PlayMode — 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.
  - `playOnCompletion` boolean, nullable — (Optional) If true, the player automatically starts playback. If false or not provided, the player remains in the PLAYBACK_IDLE state.

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