# Set website key public access

Source: https://docs.vlayers.ai/reference/public-access/put-binding-public-access

`PUT /v1/public-access/settings/bindings/{bindingId}` · scope `public_access:write`

Sets the row of a website key's Binding. A key is public only where this row says `enabled: true`, for the agent it was enabled for, and enabling needs a workspace admin and a hard daily budget on the key that covers every session it may run at once. Re-binding the key to an agent turns it off again.

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

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `bindingId` | path | string | yes | The website key Binding id. Example: `"0192f5a9-2b3c-7d4e-9f5a-6b7c8d9e0f12"` |
| `if-match` | header | string | no | The `version` of the row this edit was made from. A stale one is refused with 409 `version_conflict` instead of overwriting a newer change. Leave it out when creating a row. Example: `"3"` |
| `settings` | body | object | yes | The fields to set; any you leave out inherit from the level above. |
| `note` | body | string | no | Why the change was made; kept in the change log. |

## Request

cURL:

```bash
curl -X PUT "https://api.vlayers.ai/v1/public-access/settings/bindings/$BINDING_ID" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "settings": {
      "sessionsPerDay": 20
    }
  }'
```

TypeScript:

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

const voicelayer = new VoiceLayer();

const { version } = await voicelayer.publicAccess.setKey('<binding-id>', {
  settings: { sessionsPerDay: 20 }
});
console.log(version);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.publicAccess.set_key(
    "<binding-id>",
    settings={
        "sessionsPerDay": 20,
    },
)
print(result.version)
```

## Response `200`

```json
{
  "id": "0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67",
  "scopeKind": "binding",
  "agentId": null,
  "bindingId": "0192f5a9-2b3c-7d4e-9f5a-6b7c8d9e0f12",
  "enabledForAgentId": "0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78",
  "settings": {
    "enabled": true,
    "concurrentSessions": 2,
    "challengeKeySource": {
      "kind": "connection",
      "connectionId": "0192f5c3-7a8b-7cad-9e2f-3a4b5c6d7e89"
    }
  },
  "version": 4,
  "updatedBy": "user_2abc",
  "updatedAt": "2026-10-20T15:04:05.000Z"
}
```
