v46

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-211591,0051.4 MB
Wallets

Export wallet

Export a wallet's private key

post/v1/wallets/{wallet_id}/export

Path parameters

wallet_idstring required

ID of the wallet.

Headers

privy-app-idstring required

ID of your Privy app.

privy-authorization-signaturestring

Request authorization signature. If multiple signatures are required, they should be comma separated.

privy-request-expirystring

Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the request must be processed.

Request body

encryption_type'HPKE' required

The encryption type of the wallet to import. Currently only supports HPKE.

export_seed_phraseboolean
recipient_public_keystring required

The base64-encoded encryption public key to encrypt the wallet private key with.

Example request

{
  "encryption_type": "HPKE",
  "recipient_public_key": "BDAZLOIdTaPycEYkgG0MvCzbIKJLli/yWkAV5yCa9yOsZ4JsrLweA5MnP8YIiY4k/RRzC+APhhO+P+Hoz/rt7Go="
}

Response

The exported private key.

ciphertextstring required

The encrypted private key.

encapsulated_keystring required

The base64-encoded encapsulated key that was generated during encryption, for use during decryption.

encryption_type'HPKE' required

The encryption type of the wallet to import. Currently only supports HPKE.

Example response

{
  "ciphertext": "PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9",
  "encapsulated_key": "BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=",
  "encryption_type": "HPKE"
}