# Credential

The Credential type of the TypeScript SDK, which credentials.list take or answer.

```ts
type Credential = {
  createdAt: number
  expiresAt: number | null
  id: string
  kind: ('password' | 'app_password')
  lastUsedAt: number | null
  name: string | null
  permittedRecipients: string[] | null
  revokedAt: number | null
  scope: ('read' | 'write' | 'send' | 'full')
  username: string
}
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `createdAt` | `number` | Creation timestamp in epoch seconds |
| `expiresAt` | `number` \| `null` | Expiration timestamp in epoch seconds, or null for no expiry |
| `id` | `string` | Unique credential ULID |
| `kind` | `('password' \| 'app_password')` | Credential kind ('password' for main login, 'app_password' for client token) |
| `lastUsedAt` | `number` \| `null` | Timestamp when credential was last used in epoch seconds, or null |
| `name` | `string` \| `null` | Descriptive name or label (e.g. 'Phone Mail App'), or null |
| `permittedRecipients` | `string[]` \| `null` | The credential's OWN outbound recipient allowlist (exact addresses or `*@domain`), intersected with the identity's: both must permit. null = none of its own. Only a 'send' credential carries one |
| `revokedAt` | `number` \| `null` | Timestamp when credential was revoked in epoch seconds, or null |
| `scope` | `('read' \| 'write' \| 'send' \| 'full')` | The credential's scope, a ladder: 'read' (list and read mail — nothing that leaves a trace), 'write' (also mark, file, label and trash — everything the store can undo), 'send' (also submit mail), 'full' (also permanent deletion, every settings and credential route, PIM collection lifecycle and sharing — the human's own session, and the default) |
| `username` | `string` | Login username or email address |

## Used by

| Method | What it does |
| --- | --- |
| [`credentials.list`](/docs/sdks/typescript/credentials/list) | List mailbox credentials |
