chat

Restore private key

Get encrypted private key backup. Backup password is verified server-side. The backup is encrypted with the backup password (using PBKDF2/Argon2). Decrypt it client-side with the same backup password. Works for all users including OAuth users.

post/api/chat/backup/restore

Request body

backup_passwordstring required

Backup password - verified server-side before returning backup. This is the password you set when creating the backup (separate from Keycloak password).

Example request

{
  "backup_password": "mySecureBackupPassword123"
}

Response

Successful Response

encrypted_private_keystring required

Private key encrypted with user password

encryption_saltstring required

Salt used for key derivation

encryption_ivstring nullable

IV/nonce for AES-GCM (base64, optional if included in ciphertext)

key_typestring required

Key type

backup_enabledboolean required

Whether backup is enabled

Example response

{
  "backup_enabled": true,
  "encrypted_private_key": "base64-encrypted-private-key...",
  "encryption_iv": "base64-iv...",
  "encryption_salt": "base64-salt...",
  "key_type": "RSA-2048"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.