# Set a package sleep time

Source: https://docs.vlayers.ai/reference/hosting/update-install-hosting-settings

`PUT /v1/installs/{install}/hosting` · scope `workspace:write`

Sets how many minutes (5 to 10,080) the package waits with nothing to do before its rooms stop. The wait starts now.

Requires an API key with the `workspace:write` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `install` | path | string | yes | The install id from `GET /v1/installs`. Example: `"0192f5c3-7a8b-7c9d-8e1f-3a4b5c6d7e89"` |
| `sleepAfterIdleMinutes` | body | integer | yes | Minutes of nothing to do before it sleeps: 5 to 10,080. |

## Request

cURL:

```bash
curl -X PUT "https://api.vlayers.ai/v1/installs/$INSTALL_ID/hosting" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sleepAfterIdleMinutes": 30
  }'
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { settings } = await voicelayer.hosting.updateInstallSettings('<install-id>', {
  sleepAfterIdleMinutes: 30
});
console.log(settings);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.hosting.update_install_settings("<install-id>", sleep_after_idle_minutes=30)
print(result.settings)
```

## Response `200`

```json
{
  "kind": "install",
  "unitId": "0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67",
  "name": "com.example/orders-panel@1.0.0",
  "settings": {
    "sleepAfterIdleMinutes": 120
  },
  "alwaysOn": false,
  "sizeClass": "small",
  "warmCount": 1,
  "hourlyUsd": 0.03,
  "alwaysOnMonthlyUsd": 21.9,
  "lastActiveAt": "2026-10-20T15:04:05.000Z",
  "pollsEverySeconds": null,
  "staysAwakeBySchedule": false
}
```
