Submit import
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",
"parent_wallet_id": null,
"entity": {
"id": "jorpjo4rfxj62nx1itt8y1zt",
"type": "user"
},
"created_at": 1741834854578,
"exported_at": null,
"imported_at": null,
"archived_at": null
}Import wallet
Submit import
Submit a wallet import request.
POST
/
v1
/
wallets
/
import
/
submit
Submit import
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",
"parent_wallet_id": null,
"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.Idempotency on errors: On 4xx or 5xx, Privy caches the response and replays it for the same
key. Generate a new key to retry after a server error. Policy violations are an exception and
allow same-key retries.
Authorizations
Body
application/json
Response
200 - application/json
The imported wallet.
A wallet managed by Privy's wallet infrastructure.
Was this page helpful?

