AI Agent Setup
The link to give your agent
Share this exact URL:
https://api.expense-budget-tracker.com/v1/
That endpoint is the canonical public discovery document for AI agents. It tells the agent how to bootstrap auth, which endpoints to call next, which auth scheme to use afterward, and where to find the published API spec.
What the user does
- Open Claude Code, Codex, OpenClaw, or another agent that can make HTTP requests.
- Tell the agent to connect to Expense Budget Tracker using
https://api.expense-budget-tracker.com/v1/. - When the agent asks for an email address, provide the email you use for Expense Budget Tracker.
- Check your inbox for the 8-digit code.
- Send that code back to the agent.
- Let the agent save the returned ApiKey outside chat memory, then continue with your import, query, or budgeting task.
There is no manual key copy-paste during the login flow. The agent provisions its own connection after the email code is verified.
What the agent does
The full sequence is:
GET https://api.expense-budget-tracker.com/v1/- Read the discovery response and follow the returned actions instead of hardcoding next steps
POSTthe user email to the returnedbootstrapUrl- Receive
otpSessionTokenand theverify_codeaction - Ask the user for the 8-digit email code
POSTcode,otpSessionToken, and a connectionlabeltohttps://auth.expense-budget-tracker.com/api/agent/verify-code- Receive a new
ApiKey - Save that key outside chat memory, preferably as
EXPENSE_BUDGET_TRACKER_API_KEY GET https://api.expense-budget-tracker.com/v1/mewithAuthorization: ApiKey <key>GET https://api.expense-budget-tracker.com/v1/workspaces- If needed, create a workspace with
POST /v1/workspaces - Save a default workspace with
POST /v1/workspaces/{workspaceId}/select - Inspect allowed relations with
GET https://api.expense-budget-tracker.com/v1/schema - Run SQL through
POST https://api.expense-budget-tracker.com/v1/sql
Workspace selection is explicit, but it is not stateless. The selected workspace is saved for that API key after POST /v1/workspaces/{workspaceId}/select, so later /v1/sql calls can omit X-Workspace-Id. You can still send X-Workspace-Id to override the saved workspace for a specific request.
If the user has exactly one workspace and the key has no saved selection yet, the backend auto-saves and uses that workspace.
What the agent should store
The key returned by verify-code is long-lived. Do not rely on chat memory alone.
- Save it in a local
.envfile asEXPENSE_BUDGET_TRACKER_API_KEY='<PASTE_KEY_HERE>'if the user approves file writes - Otherwise export it in the current shell as
EXPENSE_BUDGET_TRACKER_API_KEY='<PASTE_KEY_HERE>'and ask the user to store it somewhere persistent
Authenticated requests use:
Authorization: ApiKey <key>X-Workspace-Id: <workspaceId>only when you want to override the saved workspace or before one is saved
If you are an AI agent
Start with:
curl https://api.expense-budget-tracker.com/v1/
Then follow the actions returned by the server. Do not assume hardcoded next steps if the discovery document already provides them.
After verify-code, store the returned ApiKey securely. Then load:
/v1/mefor account context/v1/workspacesfor available workspaces/v1/schemafor the allowed SQL relations and columns/v1/openapi.jsonor/v1/swagger.jsonfor the published machine-readable API spec
Example prompts for humans
Claude Code
Connect to Expense Budget Tracker using https://api.expense-budget-tracker.com/v1/.
Use my account email when needed, ask me for the 8-digit code, save the returned ApiKey outside chat memory, then import my latest bank statement from ~/Downloads.
Codex
Use https://api.expense-budget-tracker.com/v1/ to connect to my Expense Budget Tracker account.
Ask for my email, wait for the email code, save the key, inspect /schema, and then show my latest transactions.
OpenClaw
Connect yourself to Expense Budget Tracker through https://api.expense-budget-tracker.com/v1/.
After login, list my workspaces, save one as the default for this key, and import the new CSV I uploaded.
What you can do after setup
- Import bank statements or card exports
- Categorize transactions using your existing categories
- Verify account balances against the bank
- Query spending by category, period, merchant, or account
- Update budget lines for the next month
For the lower-level endpoints and auth details, see the API Reference.