Skip to content

Updating a wallet

To update an existing wallet, make a PATCH request to:

sh
https://api.privy.io/v1/wallets/<wallet_id>

Replacing <wallet_id> with the ID of your desired wallet.

TIP

In the request headers, make sure to include Privy's required authentication headers and headers that may be required for your app's wallet API setup.

Body

In the request body, include the following fields:

FieldTypeDescription
policy_idsstring[](Optional) New policy IDs to enforce on the wallet. Currently, only one policy is supported per wallet.
authorization_key_idsstring[](Optional) New authorization key IDs to authorize actions on the wallet.
authorization_key_thresholdnumber(Optional) New authorization key threshold if a quorum of authorization keys is needed to authorize wallet actions.

Any fields not included in the PATCH request body will remain unchanged from the original wallet.

Response

If the wallet is updated successfully, the response will include the updated wallet.

FieldTypeDescription
idstringUnique ID for the wallet.
addressstringAddress of the wallet.
chain_type'ethereum'Chain type for the wallet.
policy_idsMethodRuleUpdated policy IDs to enforce on the wallet.

Example

As an example, a sample request to update the authorization_key_ids of a wallet with ID rbokq6mmq5f8j1cgyr6a5g4n might look like the following:

bash
$ curl --request PATCH https://api.privy.io/v1/wallets/rbokq6mmq5f8j1cgyr6a5g4n \
-u "<your-privy-app-id>:<your-privy-app-secret>" \
-H "privy-app-id: <your-privy-app-id>" \
-H "privy-authorization-signature: <authorization-signature-for-request>" \
-H 'Content-Type: application/json' \
--data '{
    "authorization_key_ids": ['fmfdj6yqly31huorjqzq38zc']
}'

A successful response will look like the following:

json
{
  "id": "rbokq6mmq5f8j1cgyr6a5g4n",
  "address": "0xE315ce0854CcbdB0E33e71af1190F48Eb5d4f5a4",
  "chain_type": "ethereum",
  "policy_ids": [],
  "created_at": 1737492220389
}