The AutoPilot backend exposes a REST API for the frontend client. All endpoints require authentication (JWT or session).
http://localhost:3001/api
GET /account- Fetch user details, linked Stellar wallets, and limits.POST /account/limits- Update daily/weekly spending limits.
GET /vault- List all vaults (Savings, Investment) and balances.POST /vault- Create a new on-chain vault.POST /vault/withdraw- Withdraw funds from a vault to a user wallet.
GET /rules- List all active and paused automation rules.POST /rules- Create a new rule.- Body:
{ trigger, action, amount, isPercentage, memo }
- Body:
PATCH /rules/:id- Pause or resume a rule.DELETE /rules/:id- Delete a rule.
GET /transactions- List recent automated transactions and executions.
POST /chat- Send a natural language prompt to the AI coach to generate a rule.- Body:
{ prompt: string } - Response:
{ parsedRule: Rule, explanation: string }
- Body: