latestOpenAPI 3.0.32026-08-20146131.7 MB
672b1916ba61
Payments
Update wallet policy
Updates payment policy rules for a custody wallet. Wallet provisioning and default selection remain in /v1/wallets.
put/v1/payments/wallets/{walletId}/policies
Path parameters
walletIdstring required
Provider wallet ID — the walletId field returned by GET /v1/wallets. The wallet record id and the public key are not accepted.
Example:privy_wallet_123
Provider wallet ID — the walletId field returned by GET /v1/wallets. The wallet record id and the public key are not accepted.
Headers
x-project-idstring
Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.
Example:prj_example
Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.
Request body
Example request
{
"commitMessage": "Require approval for transfers above 10,000 USDC.",
"defaultAction": "allow",
"rules": [
{
"id": "approve-vault-deposits",
"kind": "operation_type",
"operationTypes": [
"earn_vault_deposit"
],
"action": "approval_required"
}
]
}Response
Wallet policy updated
Example response
{
"data": {
"policy": {
"walletId": "privy_wallet_123",
"controlProfile": {
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-01T00:00:00.000Z",
"activatedAt": "2025-01-01T00:00:00.000Z"
},
"audit": {
"recentEvaluations": [
{
"walletOperationId": "wop_example",
"policyEvaluationId": "peval_example",
"operationFamily": "payment",
"operationType": "payment_transfer_execute",
"asset": "USDC",
"amount": "100.00",
"destination": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"reasonCode": "wallet_policy_match",
"reason": "Operation family payment matched policy.",
"approvalRequestId": "appr_example",
"operationCreatedAt": "2025-01-01T00:00:00.000Z",
"operationUpdatedAt": "2025-01-01T00:00:00.000Z",
"evaluatedAt": "2025-01-01T00:00:00.000Z"
}
]
}
}
},
"meta": {
"requestId": "req_example",
"timestamp": "2025-01-01T00:00:00.000Z"
}
}