curl --request POST \
--url https://api.privy.io/v1/wallets/import/submit \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
{
"wallet": {
"address": "0xF1DBff66C993EE895C8cb176c30b07A559d76496",
"chain_type": "ethereum",
"entropy_type": "private-key",
"encryption_type": "HPKE",
"encapsulated_key": "BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=",
"ciphertext": "PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9"
},
"owner_id": "rkiz0ivz254drv1xw982v3jq"
}
'HttpResponse<String> response = Unirest.post("https://api.privy.io/v1/wallets/import/submit")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"wallet\": {\n \"address\": \"0xF1DBff66C993EE895C8cb176c30b07A559d76496\",\n \"chain_type\": \"ethereum\",\n \"entropy_type\": \"private-key\",\n \"encryption_type\": \"HPKE\",\n \"encapsulated_key\": \"BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=\",\n \"ciphertext\": \"PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9\"\n },\n \"owner_id\": \"rkiz0ivz254drv1xw982v3jq\"\n}")
.asString();const options = {
method: 'POST',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
wallet: {
address: '0xF1DBff66C993EE895C8cb176c30b07A559d76496',
chain_type: 'ethereum',
entropy_type: 'private-key',
encryption_type: 'HPKE',
encapsulated_key: 'BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=',
ciphertext: 'PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9'
},
owner_id: 'rkiz0ivz254drv1xw982v3jq'
})
};
fetch('https://api.privy.io/v1/wallets/import/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.privy.io/v1/wallets/import/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'wallet' => [
'address' => '0xF1DBff66C993EE895C8cb176c30b07A559d76496',
'chain_type' => 'ethereum',
'entropy_type' => 'private-key',
'encryption_type' => 'HPKE',
'encapsulated_key' => 'BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=',
'ciphertext' => 'PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9'
],
'owner_id' => 'rkiz0ivz254drv1xw982v3jq'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"privy-app-id: <privy-app-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.privy.io/v1/wallets/import/submit"
payload := strings.NewReader("{\n \"wallet\": {\n \"address\": \"0xF1DBff66C993EE895C8cb176c30b07A559d76496\",\n \"chain_type\": \"ethereum\",\n \"entropy_type\": \"private-key\",\n \"encryption_type\": \"HPKE\",\n \"encapsulated_key\": \"BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=\",\n \"ciphertext\": \"PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9\"\n },\n \"owner_id\": \"rkiz0ivz254drv1xw982v3jq\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "id2tptkqrxd39qo9j423etij",
"address": "0xF1DBff66C993EE895C8cb176c30b07A559d76496",
"display_name": "Treasury",
"external_id": "my-order-123",
"chain_type": "ethereum",
"policy_ids": [],
"additional_signers": [],
"owner_id": "rkiz0ivz254drv1xw982v3jq",
"entity": {
"id": "jorpjo4rfxj62nx1itt8y1zt",
"type": "user"
},
"created_at": 1741834854578,
"exported_at": null,
"imported_at": null,
"archived_at": null
}Submit import
Submit a wallet import request.
curl --request POST \
--url https://api.privy.io/v1/wallets/import/submit \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
{
"wallet": {
"address": "0xF1DBff66C993EE895C8cb176c30b07A559d76496",
"chain_type": "ethereum",
"entropy_type": "private-key",
"encryption_type": "HPKE",
"encapsulated_key": "BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=",
"ciphertext": "PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9"
},
"owner_id": "rkiz0ivz254drv1xw982v3jq"
}
'HttpResponse<String> response = Unirest.post("https://api.privy.io/v1/wallets/import/submit")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"wallet\": {\n \"address\": \"0xF1DBff66C993EE895C8cb176c30b07A559d76496\",\n \"chain_type\": \"ethereum\",\n \"entropy_type\": \"private-key\",\n \"encryption_type\": \"HPKE\",\n \"encapsulated_key\": \"BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=\",\n \"ciphertext\": \"PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9\"\n },\n \"owner_id\": \"rkiz0ivz254drv1xw982v3jq\"\n}")
.asString();const options = {
method: 'POST',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
wallet: {
address: '0xF1DBff66C993EE895C8cb176c30b07A559d76496',
chain_type: 'ethereum',
entropy_type: 'private-key',
encryption_type: 'HPKE',
encapsulated_key: 'BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=',
ciphertext: 'PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9'
},
owner_id: 'rkiz0ivz254drv1xw982v3jq'
})
};
fetch('https://api.privy.io/v1/wallets/import/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.privy.io/v1/wallets/import/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'wallet' => [
'address' => '0xF1DBff66C993EE895C8cb176c30b07A559d76496',
'chain_type' => 'ethereum',
'entropy_type' => 'private-key',
'encryption_type' => 'HPKE',
'encapsulated_key' => 'BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=',
'ciphertext' => 'PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9'
],
'owner_id' => 'rkiz0ivz254drv1xw982v3jq'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"privy-app-id: <privy-app-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.privy.io/v1/wallets/import/submit"
payload := strings.NewReader("{\n \"wallet\": {\n \"address\": \"0xF1DBff66C993EE895C8cb176c30b07A559d76496\",\n \"chain_type\": \"ethereum\",\n \"entropy_type\": \"private-key\",\n \"encryption_type\": \"HPKE\",\n \"encapsulated_key\": \"BOhR6xITDt5THJawHHJKrKdI9CBr2M/SDWzZZAaOW4gCMsSpC65U007WyKiwuuOVAo1BNm4YgcBBROuMmyIZXZk=\",\n \"ciphertext\": \"PRoRXygG+YYSDBXjCopNYZmx8Z6nvdl1D0lpePTYZdZI2VGfK+LkFt+GlEJqdoi9\"\n },\n \"owner_id\": \"rkiz0ivz254drv1xw982v3jq\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "id2tptkqrxd39qo9j423etij",
"address": "0xF1DBff66C993EE895C8cb176c30b07A559d76496",
"display_name": "Treasury",
"external_id": "my-order-123",
"chain_type": "ethereum",
"policy_ids": [],
"additional_signers": [],
"owner_id": "rkiz0ivz254drv1xw982v3jq",
"entity": {
"id": "jorpjo4rfxj62nx1itt8y1zt",
"type": "user"
},
"created_at": 1741834854578,
"exported_at": null,
"imported_at": null,
"archived_at": null
}SDK methods
Learn more about importing wallets using our SDKs here.Authorizations
Basic Auth header with your app ID as the username and your app secret as the password.
Headers
ID of your Privy app.
Body
The submission input for importing an HD wallet.
- HDSubmitInput
- PrivateKeySubmitInput
Show child attributes
Show child attributes
A human-readable label for the wallet.
100A customer-provided identifier for mapping to external systems. URL-safe characters only ([a-zA-Z0-9_-]), max 64 chars. Write-once: cannot be changed after creation.
64^[a-zA-Z0-9_-]+$List of policy IDs for policies that should be enforced on the wallet. Currently, only one policy is supported per wallet.
124The entity the wallet is attributed to.
Show child attributes
Show child attributes
{
"id": "jorpjo4rfxj62nx1itt8y1zt",
"type": "user"
}
Owner input specifying a Privy user ID.
- OwnerInputUser
- OwnerInputPublicKey
Show child attributes
Show child attributes
The key quorum ID to set as the owner of the resource. If you provide this, do not specify an owner.
Additional signers for the wallet.
Show child attributes
Show child attributes
Response
The imported wallet.
A wallet managed by Privy's wallet infrastructure.
Unique ID of the wallet. This will be the primary identifier when using the wallet in the future.
Address of the wallet.
Unix timestamp of when the wallet was created in milliseconds.
The wallet chain types.
ethereum, solana, cosmos, stellar, sui, aptos, movement, tron, bitcoin-segwit, bitcoin-taproot, pearl, near, ton, starknet, xrpl, spark List of policy IDs for policies that are enforced on the wallet.
The key quorum ID of the owner of the wallet.
Additional signers for the wallet.
Show child attributes
Show child attributes
Unix timestamp of when the wallet was exported in milliseconds, if the wallet was exported.
Unix timestamp of when the wallet was imported in milliseconds, if the wallet was imported.
A human-readable label for the wallet.
A customer-provided identifier for mapping to external systems. URL-safe characters only ([a-zA-Z0-9_-]), max 64 chars. Write-once: cannot be changed once set.
64^[a-zA-Z0-9_-]+$The compressed, raw public key for the wallet along the chain cryptographic curve.
The entity the wallet is attributed to.
Show child attributes
Show child attributes
{
"id": "jorpjo4rfxj62nx1itt8y1zt",
"type": "user"
}
The number of keys that must sign for an action to be valid.
Unix timestamp of when the wallet was archived in milliseconds, or null if the wallet is active.
Information about the custodian managing this wallet.
Show child attributes
Show child attributes
Was this page helpful?

