# Set iframe hosting rule
`PUT https://octopus.livepush.io/streams/{stream_id}/embed/iframe_restriction`
Controls whether the embed may be hosted inside an iframe.

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

### Path parameters

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


### Request body

`application/json` (required)

- `iframeRestriction` (string) **required**


```json
{
  "iframeRestriction": "iframe-only"
}
```


### Example request

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


### Responses


#### 200 — Setting applied.

- `success` (boolean)


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


#### 400 — Response


#### 401 — Response

