Skip to main content
PATCH
/
v1
/
intents
/
wallets
/
{wallet_id}
Create wallet update intent
curl --request PATCH \
  --url https://api.privy.io/v1/intents/wallets/{wallet_id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '
{
  "display_name": "<string>",
  "policy_ids": [
    "<string>"
  ],
  "owner": {
    "user_id": "<string>"
  },
  "owner_id": "<string>",
  "additional_signers": [
    {
      "signer_id": "<string>",
      "override_policy_ids": [
        "<string>"
      ]
    }
  ]
}
'
HttpResponse<String> response = Unirest.patch("https://api.privy.io/v1/intents/wallets/{wallet_id}")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"policy_ids\": [\n \"<string>\"\n ],\n \"owner\": {\n \"user_id\": \"<string>\"\n },\n \"owner_id\": \"<string>\",\n \"additional_signers\": [\n {\n \"signer_id\": \"<string>\",\n \"override_policy_ids\": [\n \"<string>\"\n ]\n }\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({
display_name: '<string>',
policy_ids: ['<string>'],
owner: {user_id: '<string>'},
owner_id: '<string>',
additional_signers: [{signer_id: '<string>', override_policy_ids: ['<string>']}]
})
};

fetch('https://api.privy.io/v1/intents/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/intents/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([
'display_name' => '<string>',
'policy_ids' => [
'<string>'
],
'owner' => [
'user_id' => '<string>'
],
'owner_id' => '<string>',
'additional_signers' => [
[
'signer_id' => '<string>',
'override_policy_ids' => [
'<string>'
]
]
]
]),
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/intents/wallets/{wallet_id}"

payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"policy_ids\": [\n \"<string>\"\n ],\n \"owner\": {\n \"user_id\": \"<string>\"\n },\n \"owner_id\": \"<string>\",\n \"additional_signers\": [\n {\n \"signer_id\": \"<string>\",\n \"override_policy_ids\": [\n \"<string>\"\n ]\n }\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))

}
{
  "intent_id": "<string>",
  "created_by_display_name": "<string>",
  "created_at": 123,
  "resource_id": "<string>",
  "authorization_details": [
    {
      "members": [
        {
          "type": "user",
          "user_id": "<string>",
          "signed_at": 123
        }
      ],
      "threshold": 123,
      "display_name": "<string>"
    }
  ],
  "custom_expiry": true,
  "expires_at": 123,
  "intent_type": "WALLET",
  "request_details": {
    "method": "PATCH",
    "url": "<string>",
    "body": {
      "display_name": "<string>",
      "policy_ids": [
        "<string>"
      ],
      "authorization_key_ids": [
        "<string>"
      ],
      "authorization_threshold": 123,
      "additional_signers": [
        {
          "signer_id": "<string>",
          "override_policy_ids": [
            "<string>"
          ]
        }
      ],
      "owner": {
        "user_id": "<string>"
      },
      "owner_id": "<string>"
    }
  },
  "created_by_id": "<string>",
  "rejected_at": 123,
  "dismissed_at": 123,
  "dismissal_reason": "<string>",
  "current_resource_data": {
    "id": "id2tptkqrxd39qo9j423etij",
    "address": "0xF1DBff66C993EE895C8cb176c30b07A559d76496",
    "display_name": "Treasury",
    "external_id": "my-order-123",
    "chain_type": "ethereum",
    "policy_ids": [],
    "additional_signers": [],
    "owner_id": "rkiz0ivz254drv1xw982v3jq",
    "created_at": 1741834854578,
    "exported_at": null,
    "imported_at": null,
    "archived_at": null
  },
  "action_result": {
    "status_code": 123,
    "executed_at": 123,
    "response_body": {
      "id": "id2tptkqrxd39qo9j423etij",
      "address": "0xF1DBff66C993EE895C8cb176c30b07A559d76496",
      "display_name": "Treasury",
      "external_id": "my-order-123",
      "chain_type": "ethereum",
      "policy_ids": [],
      "additional_signers": [],
      "owner_id": "rkiz0ivz254drv1xw982v3jq",
      "created_at": 1741834854578,
      "exported_at": null,
      "imported_at": null,
      "archived_at": null
    },
    "prior_state": {
      "id": "id2tptkqrxd39qo9j423etij",
      "address": "0xF1DBff66C993EE895C8cb176c30b07A559d76496",
      "display_name": "Treasury",
      "external_id": "my-order-123",
      "chain_type": "ethereum",
      "policy_ids": [],
      "additional_signers": [],
      "owner_id": "rkiz0ivz254drv1xw982v3jq",
      "created_at": 1741834854578,
      "exported_at": null,
      "imported_at": null,
      "archived_at": null
    },
    "authorized_by_display_name": "<string>",
    "authorized_by_id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Basic Auth header with your app ID as the username and your app secret as the password.

Headers

privy-app-id
string
required

ID of your Privy app.

privy-request-expiry
string

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

Path Parameters

wallet_id
string
required

ID of the wallet.

Body

application/json

Request body for updating a wallet. owner and owner_id are mutually exclusive.

display_name
string | null

A human-readable label for the wallet. Set to null to clear.

Maximum string length: 100
policy_ids
string[]

New policy IDs to enforce on the wallet. Currently, only one policy is supported per wallet.

Maximum array length: 1
Required string length: 24
owner
OwnerInputUser · object

New owner of the wallet. Cannot be used together with owner_id. Set to null to clear the existing owner.

owner_id
string<cuid2> | null

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
AdditionalSignerItemInput · object[]

Additional signers for the wallet.

Response

200 - application/json

Created wallet update intent.

Response for a wallet intent

intent_id
string
required

Unique ID for the intent

created_by_display_name
string
required

Display name of the user who created the intent

created_at
number
required

Unix timestamp when the intent was created

resource_id
string
required

ID of the resource being modified (wallet_id, policy_id, etc)

authorization_details
IntentAuthorization · object[]
required

Detailed authorization information including key quorum members, thresholds, and signature status

status
enum<string>
required

Current status of an intent.

Available options:
pending,
processing,
executed,
failed,
expired,
rejected,
dismissed
custom_expiry
boolean
required

Whether this intent has a custom expiry time set by the client. If false, the intent expires after a default duration.

expires_at
number
required

Unix timestamp when the intent expires

intent_type
enum<string>
required
Available options:
WALLET
request_details
object
required

The original wallet update request that would be sent to the wallet endpoint

created_by_id
string

ID of the user who created the intent. If undefined, the intent was created using the app secret

rejected_at
number

Unix timestamp when the intent was rejected, present when status is 'rejected'

dismissed_at
number

Unix timestamp when the intent was dismissed, present when status is 'dismissed'

dismissal_reason
string

Human-readable reason for dismissal, present when status is 'dismissed'

current_resource_data
Wallet · object

Current state of the wallet before any changes. If undefined, the resource was deleted and no longer exists

Example:
{
"id": "id2tptkqrxd39qo9j423etij",
"address": "0xF1DBff66C993EE895C8cb176c30b07A559d76496",
"display_name": "Treasury",
"external_id": "my-order-123",
"chain_type": "ethereum",
"policy_ids": [],
"additional_signers": [],
"owner_id": "rkiz0ivz254drv1xw982v3jq",
"created_at": 1741834854578,
"exported_at": null,
"imported_at": null,
"archived_at": null
}
action_result
BaseActionResult · object

Result of wallet update execution (only present if status is 'executed' or 'failed')