# Read public access usage today

Source: https://docs.vlayers.ai/reference/public-access/get-public-access-usage

`GET /v1/public-access/usage` · scope `public_access:read`

Counts what happened on a website key today (UTC): sessions admitted and ended, and attempts turned away with the reason (a visitor sees one generic message, you see why). Read from the records the checks keep, so it is exact even after a restart. Pair it with the key's daily budget for spend.

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

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `keyId` | query | string | yes | The publishable website key to report on. Example: `"key_9b3d42"` |

## Request

cURL:

```bash
curl "https://api.vlayers.ai/v1/public-access/usage?keyId=$WEBSITE_KEY_ID" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY"
```

TypeScript:

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

const voicelayer = new VoiceLayer();

const { admitted } = await voicelayer.publicAccess.usage({ keyId: '<website-key-id>' });
console.log(admitted);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.publicAccess.usage(key_id="<website-key-id>")
print(result.admitted)
```

## Response `200`

```json
{
  "keyId": "key_9b3d42",
  "since": "2026-10-20T00:00:00.000Z",
  "admitted": 12,
  "ended": 11,
  "refusals": [
    {
      "reason": "challenge_failed",
      "count": 3
    },
    {
      "reason": "ip_rate",
      "count": 1
    }
  ],
  "recent": [
    {
      "admittedAt": "2026-10-20T15:04:05.000Z",
      "endedAt": "2026-10-20T15:04:05.000Z",
      "endReason": "room_finished"
    }
  ]
}
```
