# Set preferred embed destination
`PUT https://octopus.livepush.io/streams/{stream_id}/embed/preferred_destination`
Chooses which connected destination the embed plays back from.

Requires a token with write access to the stream (`CanWriteStreams`).
- **Tag:** Stream Embed
- **Operation ID:** `putStreamEmbedPreferredDestination`
- **Authentication:** Bearer token required
- **Docs:** https://developers.livepush.io/stream-embed/set-preferred-embed-destination/

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stream_id` | string | yes | Unique identifier of the stream. |


### Request body

`application/json` (required)

- `destinationId` (string) **required**


```json
{
  "destinationId": "pb_xxxxxxxxxxxx"
}
```


### Example request

```bash
curl -X PUT 'https://octopus.livepush.io/streams/st_xxxxxxxxxxxxx/embed/preferred_destination' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "destinationId": "pb_xxxxxxxxxxxx"
  }'
```


### Responses


#### 200 — Setting applied.

- `success` (boolean)


```json
{
  "success": true
}
```


#### 400 — Response


#### 401 — Response

