Skip to content

Submit Endpoint

POST /agent/submit

The submit endpoint lets you send a pre-built transaction directly to the blockchain. Unlike the Prompt Endpoint, there is no AI interpretation — you provide the exact calldata, target address, and value, and Bankr submits it on your behalf.

When to use this:

  • You have already encoded the transaction calldata yourself.
  • You are making custom contract calls or DeFi interactions.
  • You know exactly what transaction to send and do not need natural language processing.

Prompt vs Submit: The Prompt endpoint interprets natural language and builds the transaction for you. The Submit endpoint takes a pre-built transaction and executes it as-is.

Submit a raw transaction
curl -X POST https://api.bankr.bot/agent/submit \
-H "X-API-Key: bk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"transaction": {
"to": "0xContractAddress",
"data": "0xCalldata...",
"value": "0x0",
"chainId": 8453
},
"waitForConfirmation": true
}'
FieldTypeDescription
transaction.tostringTarget contract address
transaction.datastringEncoded calldata
transaction.valuestringETH value in hex (use "0x0" for no value)
transaction.chainIdnumberChain ID (8453 for Base)
waitForConfirmationbooleanWait for on-chain confirmation before responding