# Toggle event looping
`PUT https://octopus.livepush.io/streams/{stream_id}/config/scheduler/{event_id}/loop`
Turns looping on or off for one event. Note the path has no `/events/`
segment.

This also sets the stream's looping setting to the same value. Looping
requires a plan that includes it.

Requires a token with the `streams.write` scope.
- **Tag:** Stream Scheduler
- **Operation ID:** `putStreamsStreamIdConfigSchedulerEventIdLoop`
- **Authentication:** Bearer token required
- **Docs:** https://developers.livepush.io/stream-scheduler/toggle-event-looping/

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stream_id` | string | yes | Unique identifier of the pre-recorded live stream |
| `event_id` | string | yes | Unique identifier of the scheduled event |


### Request body

`application/json` (required)

- `loop` (boolean) **required**


```json
{
  "loop": true
}
```


### Example request

```bash
curl -X PUT 'https://octopus.livepush.io/streams/<stream_id>/config/scheduler/<event_id>/loop' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "loop": true
  }'
```


### Responses


#### 200 — Event looping updated

- `success` (boolean)


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


#### 400 — Unknown stream or event


#### 401 — Unauthorized

