# RecoveryStatus

The RecoveryStatus type of the TypeScript SDK, which recovery.getStatus take or answer.

```ts
type RecoveryStatus = {
  address: string | null
  addressPlaintext?: string | null
  codesLockedUntil: number | null
  codesRemaining: number
  invitation: RecoveryStatusInvitation | null
  pending: string | null
  policy: ('self_service' | 'admin_only')
  state: ('none' | 'pending' | 'verified')
  usableAfter: number | null
}
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `address` | `string` \| `null` | Verified recovery address, masked (j••@ex•••.com), or null if none is verified |
| `addressPlaintext` | `string` \| `null` | Optional. The unmasked verified address. Present for system principals only |
| `codesLockedUntil` | `number` \| `null` | Epoch seconds until code submission is refused after repeated wrong codes, or null |
| `codesRemaining` | `number` | Unspent recovery codes. Zero means either none were ever issued or all are spent |
| `invitation` | [`RecoveryStatusInvitation`](/docs/sdks/typescript/types/recovery-status-invitation) \| `null` | An outstanding provisioning invitation, or null. This IS the idempotency answer for POST /identities/:id/invitation (§XVII.5): a caller that lost its create response asks whether one is outstanding rather than holding an idempotency key, because an invitation is never re-sent automatically and a repeat is always a deliberate second call. Consumed and expired both read as null |
| `pending` | `string` \| `null` | A typed, unconfirmed address, masked, or null. Reported ALONGSIDE `state` because §II.3 allows both at once (replacing does not disarm: the old address keeps working until the new one confirms), so a settings screen has to be able to show a change in flight without implying the old one has stopped |
| `policy` | `('self_service' \| 'admin_only')` | The account's recovery policy. admin_only keeps existing rows and refuses their use |
| `state` | `('none' \| 'pending' \| 'verified')` | Address state: none, pending (typed, unconfirmed, never a reset target), or verified. `verified` wins when BOTH exist, because that is the address a reset would use |
| `usableAfter` | `number` \| `null` | Epoch seconds until which a newly verified address may receive notices but not drive a reset (the 72h cooldown); null when nothing is waiting |

## Used by

| Method | What it does |
| --- | --- |
| [`recovery.getStatus`](/docs/sdks/typescript/recovery/get-status) | Read mailbox recovery posture |
