Skip to content

API Reference

Base URL: https://api.botwallet.co/v1

The CLI and MCP server are the supported clients. Actions that sign transactions (payment and withdrawal confirmation, x402 purchases, registration) involve a FROST signing round trip that those clients implement for you; use them unless you are porting the protocol to a new language. Everything else can be called directly.

EndpointMethodAuthPurpose
/botPOSTBearer bw_bot_...Everything an agent does
/merchantPOSTBearer bw_merchant_...Merchant reconciliation, see Merchant integration
/publicGET / POSTnoneThe pages the dashboard uses for paying, funding and claiming

Every call is a POST with a JSON body containing an action and its parameters at the top level.

POST /v1/bot
Authorization: Bearer bw_bot_...
Content-Type: application/json
X-Idempotency-Key: 6f1c0d2e-... (optional, for pay and withdraw)
{ "action": "pay", "to": "merchant", "amount": 10.00, "note": "API usage" }

Bot API keys are created at registration, shown once and stored hashed. A key identifies the wallet; it cannot move funds on its own because signing also needs the agent’s key share.

{ "success": true, "data": { "...": "..." } }
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key",
"how_to_fix": "Include header: Authorization: Bearer <api_key>"
}
}

Common codes: VALIDATION_ERROR, UNAUTHORIZED, WALLET_NOT_CLAIMED, NOT_FOUND, INSUFFICIENT_FUNDS, INVALID_RECIPIENT, INVALID_STATUS, AWAITING_APPROVAL, ALREADY_COMPLETED, TRANSACTION_EXPIRED, INTERNAL_ERROR.

ActionDescription
pingAPI status and version
dkg_init, dkg_completeFROST distributed key generation, used by register
registerCreate a wallet: name, owner_email?, agent_model?, description?, metadata?. Returns the API key, username, claim URL and claim code
wallet_import_keyRetrieve the decryption key for a .bwlt import

Only info, update_owner and update_name work before the wallet is claimed; everything else returns WALLET_NOT_CLAIMED.

ActionDescription
infoWallet metadata, status and claim info
update_ownerChange the pledged owner email (owner_email). Unclaimed wallets only
update_nameChange the display name (name)
balanceOn-chain balance, budget and remaining allowance
reconcileRe-check the on-chain balance
ActionDescription
lookupusername: does the recipient exist
can_i_affordto, amount: balance and guard-rail pre-check
payto + amount, or payment_request_id; note?, reference?. Creates the intent and returns transaction_id and status (pre_approved, awaiting_approval or rejected)
confirm_paymenttransaction_id: returns the message to sign
frost_sign_init, frost_sign_complete, submit_signed_txFROST signing rounds and submission to Solana
list_paymentsstatus?, limit?, offset?
cancel_paymenttransaction_id
ActionDescription
create_payment_requestdescription, amount?, items?, reference?, expires_in?, reveal_owner?. Returns the paylink
get_payment_requestrequest_id or reference
list_payment_requestsstatus?, limit?, offset?
cancel_payment_requestrequest_id
send_paylink_invitationrequest_id, to_email or to_wallet, message?
ActionDescription
get_deposit_addressThe wallet’s Solana USDC address
request_fundsamount, reason
list_fund_requestsstatus?, limit?, offset?
withdrawamount, to_address, reason. Always needs owner approval
confirm_withdrawaltransaction_id, after approval
get_withdrawalwithdrawal_id
ActionDescription
x402_prepareProbe a URL and create a payment intent for its 402 requirements
x402_confirm, x402_sign_complete, x402_settlePay, sign and settle the purchase

The curated API catalog is public: GET /public?action=x402_catalog.

ActionDescription
transactionstype?, limit?, offset?
my_limitsThe owner’s guard rails as they apply to this wallet
pending_approvalsEverything waiting for the owner
approval_statusapproval_id
eventstypes?, limit?, unread_only?, since?
mark_readMark events as read
wallet_exportServer-side half of a .bwlt export
StatusConfirmableMeaning
pre_approvedyesGuard rails passed; confirm to sign and submit
awaiting_approvalnoWaiting for the owner
approvedyesOwner approved; confirm to sign and submit
rejectednoBlocked by guard rails or the owner
pendingnoBeing submitted to Solana
completedSettled on-chain
failednoSolana submission failed
expirednoNot confirmed within 48 hours

Send an X-Idempotency-Key header (the CLI’s --idempotency-key, the MCP idempotency_key parameter) with pay and withdraw. Retrying with the same key returns the original result instead of creating a second transaction.

GET /public?action=<name> serves the pages that humans use. Useful read-only actions: pay&short_code=... (paylink details), pay_status&short_code=... (has it been paid), claim_info&wallet_id=..., x402_catalog and stats.