v1
latestOpenAPI 3.0.02026-07-175152156.1 KBUser
Request withdrawal
Generates an ERC-4337 UserOperation for withdrawing tokens from the agent smart account back to the user. The user must sign the UserOperation to authorize the withdrawal.
post/user/{appId}/request-withdraw
Path parameters
appIdnumber required
ID of the target application
Request body
Example request
{
"userControllerAddress": "0x123456789012345678901234567890123456abcd",
"assets": [
{
"network": "base-mainnet",
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": 100
}
]
}Response
Withdrawal UserOperation returned successfully
Example response
{
"withdrawals": [
{
"network": "base-mainnet",
"userOpHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
],
"errors": [
{
"network": "base-mainnet",
"error": "Insufficient balance for USDC: requested 100, available 50"
}
]
}