Build a sponsored UserOperation¶
POST /api/aa/build-userop
Builds an unsigned ERC-4337 v0.7 UserOperation for the given account and calls, with the EntryPoint nonce, factory initCode (when the account is not yet deployed), conservative gas limits, current fees, and a paymaster signature already attached. Returns the UserOperation and the userOpHash for the account owner to sign (EIP-191 personal_sign). Building is unprivileged; metering happens at submission against the owner.
Authentication
Send your API key in the api-key header.
Responses
| Status | Description |
|---|---|
200 |
The unsigned UserOperation + the hash to sign. |
200 response
{
"success": true,
"data": {
"userOp": {
"sender": "0x9a7f\u2026",
"nonce": "0x0",
"callData": "0x\u2026",
"callGasLimit": "0x\u2026",
"verificationGasLimit": "0x\u2026",
"preVerificationGas": "0x\u2026",
"maxFeePerGas": "0x\u2026",
"maxPriorityFeePerGas": "0x\u2026",
"paymaster": "0xpay\u2026",
"paymasterData": "0x\u2026",
"signature": "0x"
},
"userOpHash": "0xabc\u2026",
"entryPoint": "0x0000000071727De22E5E9d8BAf0edAc6f37da032"
},
"timestamp": "2026-07-31T00:00:00.000Z"
}