# MailboxWithStats

The MailboxWithStats type of the TypeScript SDK, which mailboxes.get take or answer.

```ts
type MailboxWithStats = Mailbox & {
  databaseLimitBytes?: number
  databaseSize?: number
  expungedBytes?: number
  expungedCount?: number
  liveSockets?: number
  messageCount?: number
  semanticFloor?: number | null
  socketCapacity?: number
  socketsByClass?: Record<string, number>
  usedBytes?: number
}
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `databaseLimitBytes` | `number` | Optional. Ceiling limit for metadata database size in bytes |
| `databaseSize` | `number` | Optional. SQLite metadata database size in bytes |
| `expungedBytes` | `number` | Optional. Storage recoverable by emptying trash in bytes |
| `expungedCount` | `number` | Optional. Number of soft-deleted messages in trash |
| `liveSockets` | `number` | Optional. Currently connected live-events WebSocket connections |
| `messageCount` | `number` | Optional. Total number of active messages |
| `semanticFloor` | `number` \| `null` | Optional. When semantic search is on: the earliest arrival time (epoch seconds) the backfill embeds — mail received before it is lexically searchable only. 0 = everything. Lower it with PATCH /identities/:id \{ semanticFloor \} ("index older mail"); null when semantic search is off |
| `socketCapacity` | `number` | Optional. Maximum allowed simultaneous WebSocket connections |
| `socketsByClass` | `Record<string, number>` | Optional. Active WebSocket connections broken down by client class |
| `usedBytes` | `number` | Optional. Total storage used in bytes including trash |

## Used by

| Method | What it does |
| --- | --- |
| [`mailboxes.get`](/docs/sdks/typescript/mailboxes/get) | Get mailbox details and usage statistics |
