curl --request PATCH \
--url https://api.privy.io/v1/wallets/{wallet_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
{
"policy_ids": [
"tb54eps4z44ed0jepousxi4n"
]
}
'HttpResponse<String> response = Unirest.patch("https://api.privy.io/v1/wallets/{wallet_id}")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"policy_ids\": [\n \"tb54eps4z44ed0jepousxi4n\"\n ]\n}")
.asString();const options = {
method: 'PATCH',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({policy_ids: ['tb54eps4z44ed0jepousxi4n']})
};
fetch('https://api.privy.io/v1/wallets/{wallet_id}', 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/{wallet_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'policy_ids' => [
'tb54eps4z44ed0jepousxi4n'
]
]),
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/{wallet_id}"
payload := strings.NewReader("{\n \"policy_ids\": [\n \"tb54eps4z44ed0jepousxi4n\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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
}Update wallet
Update a wallet’s policies or authorization key configuration.
curl --request PATCH \
--url https://api.privy.io/v1/wallets/{wallet_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
{
"policy_ids": [
"tb54eps4z44ed0jepousxi4n"
]
}
'HttpResponse<String> response = Unirest.patch("https://api.privy.io/v1/wallets/{wallet_id}")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"policy_ids\": [\n \"tb54eps4z44ed0jepousxi4n\"\n ]\n}")
.asString();const options = {
method: 'PATCH',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({policy_ids: ['tb54eps4z44ed0jepousxi4n']})
};
fetch('https://api.privy.io/v1/wallets/{wallet_id}', 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/{wallet_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'policy_ids' => [
'tb54eps4z44ed0jepousxi4n'
]
]),
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/{wallet_id}"
payload := strings.NewReader("{\n \"policy_ids\": [\n \"tb54eps4z44ed0jepousxi4n\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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
}Authorizations
Basic Auth header with your app ID as the username and your app secret as the password.
Headers
ID of your Privy app.
Request authorization signature. If multiple signatures are required, they should be comma separated.
Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the request must be processed.
Path Parameters
ID of the wallet.
Body
Request body for updating a wallet. owner and owner_id are mutually exclusive.
A human-readable label for the wallet. Set to null to clear.
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 once set.
64^[a-zA-Z0-9_-]+$New policy IDs to enforce on the wallet. Currently, only one policy is supported per wallet.
124New owner of the wallet. Cannot be used together with owner_id. Set to null to clear the existing owner.
- OwnerInputUser
- OwnerInputPublicKey
Show child attributes
Show child attributes
New key quorum ID to set as the owner of the wallet. Cannot be used together with owner. Set to null to clear the existing owner.
Additional signers for the wallet.
Show child attributes
Show child attributes
Response
Updated wallet object.
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?

