REST Endpoints

Full reference for the Bithaven REST API. All endpoints are prefixed with /api/v1.

Auth

/api/v1/auth

Auth: None (public)

MethodPathDescription
POST/signupCreate account. Returns user + JWT.
POST/loginAuthenticate. Returns user + JWT.
POST/logoutInvalidate JWT session.
GET/meGet current user.

Master Wallet

/api/v1/wallet

Auth: JWT

MethodPathDescription
GET/Get master wallet (address, balance).
GET/balanceGet balance only.
GET/depositsPaginated deposit history. Query: page, limit.

Agent Wallets

/api/v1/agent-wallets

Auth: JWT

MethodPathDescription
POST/Create agent wallet. Body: { "label": "My Agent" }
GET/List all agent wallets for user.
GET/:idGet single agent wallet.
PATCH/:idUpdate label. Body: { "label": "New Name" }
POST/:id/fundTransfer from master. Body: { "amount": "50.00" }
POST/:id/withdrawTransfer to master. Body: { "amount": "25.00" }
POST/:id/freezeFreeze wallet. Blocks all agent transactions.
POST/:id/unfreezeUnfreeze wallet.

API Keys

/api/v1/agent-wallets/:walletId/keys

Auth: JWT

MethodPathDescription
POST/Create API key. Body: { "label": "prod-key", "scopes": ["read","write"] }
GET/List keys for wallet (prefix + metadata only).
POST/:keyId/revokeRevoke a key immediately.

Policies

/api/v1/agent-wallets/:walletId/policies

Auth: JWT

MethodPathDescription
POST/Create policy. Body: { "type": "spend_cap_daily", "params": { "limit": "50.00" } }
GET/List policies for wallet.
PATCH/policies/:idUpdate policy params or active status.
DELETE/policies/:idDelete policy.

Transactions

/api/v1/agent-wallets/:walletId/transactions

Auth: JWT

MethodPathDescription
GET/List transactions for wallet.
GET/pendingList transactions awaiting approval.
POST/transactions/:id/approveApprove a pending transaction.
POST/transactions/:id/rejectReject. Body: { "reason": "..." }

Notifications

/api/v1/notifications

Auth: JWT

MethodPathDescription
GET/preferencesGet notification preferences.
PATCH/preferencesUpdate notification preferences.

Dashboard

/api/v1/dashboard

Auth: JWT

MethodPathDescription
GET/statsOverview stats (total balance, agents, pending txs).
GET/activityUnified activity feed. Query: page, limit, type.

Waitlist

/api/v1/waitlist

Auth: None

MethodPathDescription
POST/Join waitlist. Body: { "email": "..." }