Skip to Content

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

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

FieldTypeDescription
addressstring | nullVerified recovery address, masked (j••@ex•••.com), or null if none is verified
addressPlaintextstring | nullOptional. The unmasked verified address. Present for system principals only
codesLockedUntilnumber | nullEpoch seconds until code submission is refused after repeated wrong codes, or null
codesRemainingnumberUnspent recovery codes. Zero means either none were ever issued or all are spent
invitationRecoveryStatusInvitation | nullAn 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
pendingstring | nullA 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
usableAfternumber | nullEpoch 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

MethodWhat it does
recovery.getStatusRead mailbox recovery posture

On this page