# Install a package

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

`POST /v1/installs` · scope `workspace:write`

Installs one published version in your workspace. You agree to the hash of the summary you read (`consentToSummary`); if the version changed since, nothing is installed and the answer carries the new summary. The package runs in your own rooms, from a sealed copy of the version, and only if its publisher's signature verifies. Every install is recorded with who agreed and to which summary.

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

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `packageId` | body | string | yes | The package, as `<namespace>/<name>`. |
| `versionId` | body | string | yes | The id of the published version to install. |
| `consentToSummary` | body | string | yes | The `summary.hash` you read in the preview. |
| `sizeClass` | body | "small" \| "medium" \| "large" | no | The room size to run it in: `small` (default), `medium` or `large`. |
| `warmCount` | body | integer | no | How many copies to keep ready (1 to 20, default 1). |
| `updateMode` | body | "manual" \| "automatic" | no | `manual` (default): every new version waits for your word. `automatic`: a version that does not widen what the package can do installs by itself. |

## Request

cURL:

```bash
curl -X POST https://api.vlayers.ai/v1/installs \
  -H "Authorization: Bearer $VOICELAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "packageId": "com.example/orders-panel",
    "versionId": "0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67",
    "consentToSummary": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
  }'
```

TypeScript:

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

const voicelayer = new VoiceLayer();

const { state } = await voicelayer.hosting.createInstall({
  packageId: 'com.example/orders-panel',
  versionId: '0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67',
  consentToSummary: 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
});
console.log(state);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.hosting.create_install(
    package_id="com.example/orders-panel",
    version_id="0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67",
    consent_to_summary="bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
)
print(result.state)
```

## Response `201`

```json
{
  "id": "0192f5c3-7a8b-7c9d-8e1f-3a4b5c6d7e89",
  "packageId": "com.example/orders-panel",
  "kind": "tool-set",
  "publisherWorkspaceId": "org_publisher",
  "versionId": "0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67",
  "label": "com.example/orders-panel@1.0.0",
  "state": "active",
  "updateMode": "manual",
  "summary": {
    "lines": [
      {
        "section": "hosts",
        "key": "host:api.example.com",
        "text": "It can send data to api.example.com."
      }
    ],
    "hash": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
  },
  "consentedBy": "user_2abc",
  "consentedAt": "2026-10-20T15:04:05.000Z",
  "notice": null,
  "pendingUpdate": null,
  "sizeClass": "small",
  "warmCount": 1,
  "screens": false
}
```
