Using the API
Authenticate with an API key and call common endpoints
Hosted vs self-hosted
| Base URL | |
|---|---|
| Hosted (default) | https://guilders.app |
| Self-hosted / local | Your API origin, e.g. http://localhost:3000 |
The rest of this page uses the hosted URL. Swap the host if you run your own server.
Authentication
For scripts, agents, and third-party apps, create an API key in the dashboard under Settings → Developer, then send it on every request:
x-api-key: <your-api-key>The dashboard itself uses a Better Auth session cookie. Some clients also send Authorization: Bearer <token>. All three are valid; API keys are the intended path for the hosted API.
Core Endpoints
GET /api/account— list all accounts for the authenticated user.POST /api/account— create a manual account.GET /api/transaction— list transactions (newest first).POST /api/transaction— create a manual transaction.GET /api/account/:id/transaction— transactions for one account.
Example Requests
curl https://guilders.app/api/account \
-H "x-api-key: $GUILDERS_API_KEY"curl "https://guilders.app/api/transaction?limit=20" \
-H "x-api-key: $GUILDERS_API_KEY"curl https://guilders.app/api/account \
-X POST \
-H "x-api-key: $GUILDERS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Emergency Cash",
"type": "asset",
"subtype": "depository",
"value": "5000",
"currency": "USD"
}'OpenAPI Explorer
Use the OpenAPI reference for schemas, parameters, and try-it-out. The same spec is also served at guilders.app/openapi.