Skip to main content
POST
https://api.heyvincent.ai
/
user
/
{appId}
/
complete-withdraw
curl -X POST https://api.heyvincent.ai/user/123/complete-withdraw \
  -H "Content-Type: application/json" \
  -d '{
    "withdrawals": [
      {
        "network": "base-mainnet",
        "userOp": {
          "sender": "0xAgentSmartAccountAddress...",
          "nonce": "0x1",
          "callData": "0xa9059cbb...",
          "callGasLimit": "0x5208",
          "verificationGasLimit": "0x10000",
          "preVerificationGas": "0x5208",
          "maxFeePerGas": "0x3b9aca00",
          "maxPriorityFeePerGas": "0x3b9aca00",
          "paymaster": "0xPaymasterAddress...",
          "paymasterData": "0x..."
        },
        "signature": "0xUserSignature..."
      }
    ]
  }'
{
  "transactions": [
    {
      "network": "base-mainnet",
      "transactionHash": "0xabc123...",
      "userOpHash": "0xdef456..."
    }
  ]
}
Complete the withdrawal by submitting signed UserOperations to the blockchain. This endpoint broadcasts the signed transactions to the ZeroDev bundler and waits for confirmation.
The transaction will be rejected if the Agent account does not have enough native tokens to pay for gas fees.

Request

appId
integer
required
The unique identifier of the app
withdrawals
array
required
List of signed withdrawals to execute

Response

transactions
array
List of completed transactions
errors
array
List of errors for networks that failed to complete (only present if some networks failed)
curl -X POST https://api.heyvincent.ai/user/123/complete-withdraw \
  -H "Content-Type: application/json" \
  -d '{
    "withdrawals": [
      {
        "network": "base-mainnet",
        "userOp": {
          "sender": "0xAgentSmartAccountAddress...",
          "nonce": "0x1",
          "callData": "0xa9059cbb...",
          "callGasLimit": "0x5208",
          "verificationGasLimit": "0x10000",
          "preVerificationGas": "0x5208",
          "maxFeePerGas": "0x3b9aca00",
          "maxPriorityFeePerGas": "0x3b9aca00",
          "paymaster": "0xPaymasterAddress...",
          "paymasterData": "0x..."
        },
        "signature": "0xUserSignature..."
      }
    ]
  }'
{
  "transactions": [
    {
      "network": "base-mainnet",
      "transactionHash": "0xabc123...",
      "userOpHash": "0xdef456..."
    }
  ]
}