API Documentation

Open Source

Daily Expense Tracker REST API. All endpoints return JSON. Authenticated endpoints require a Bearer token via the Authorization header.

Base URL

https://dailyexpensetracker.in/api

Authentication

Public endpoints — no token required.

POST /register
Register a new user account. Body: name, email, password, password_confirmation
POST /login
Login with email and password. Returns a Bearer token. Body: email, password
POST /auth/send-otp
Send a one-time password to the user's email. Body: email
POST /auth/verify-otp
Verify OTP and receive a Bearer token. Body: email, otp
POST /auth/google/callback
Google OAuth token exchange. Body: code (authorization code from Google)
POST /logout Auth
Revoke the current access token and logout.

User

All endpoints require Auth

GET /user
Get the authenticated user's profile.
GET /user/activity
Get the user's recent activity timeline.

Transactions

All endpoints require Auth

GET /transactions
List all transactions for the authenticated user.
POST /transactions
Create a new transaction. Body: type (expense|income), amount, category_id, note, transaction_date, wallet_id
GET /transactions/{id}
Get a single transaction by ID.
PUT /transactions/{id}
Update a transaction.
DELETE /transactions/{id}
Soft-delete a transaction (moves to trash).
GET /transactions/search
Search transactions. Query: q
GET /transactions/paginated
Paginated transactions with filters. Query params for date range, type, category, wallet.
GET /transactions/trashed
List soft-deleted transactions.
POST /transactions/{id}/restore
Restore a soft-deleted transaction.
DELETE /transactions/{id}/force
Permanently delete a transaction.
GET /transactions/activity-bar-data-v2
Activity bar chart data for visualizations.
GET /transactions/daily-bar-data
Daily bar chart data.

Wallets

All endpoints require Auth

GET /wallets
List all wallets for the authenticated user.
POST /wallets
Create a new wallet. Body: name, type (cash|bank|credit_card|...), balance, currency
GET /wallets/{id}
Get wallet details.
PUT /wallets/{id}
Update a wallet.
DELETE /wallets/{id}
Delete a wallet.
GET /wallets/{id}/transactions
Get all transactions for a specific wallet.
GET /wallets/{id}/balance-history
Get wallet balance history over time.
POST /wallets/transfer
Transfer money between wallets. Body: from_wallet_id, to_wallet_id, amount, note
GET /wallets/transfers
Get all wallet transfer history.

Categories

All endpoints require Auth

GET /categories
List all categories.
POST /categories
Create a custom category. Body: name, color, icon
GET /user-categories
Get only the authenticated user's custom categories.

Recurring Expenses

All endpoints require Auth

GET /recurring-expenses
List all recurring expenses.
POST /recurring-expenses
Create a recurring expense. Body: name, amount, frequency, category_id
GET /recurring-expenses/{id}
Get a recurring expense.
PUT /recurring-expenses/{id}
Update a recurring expense.
DELETE /recurring-expenses/{id}
Delete a recurring expense.
GET /recurring-expenses-suggestions
Get EMI/loan suggestions.
GET /recurring-expenses/{id}/loan-details
Get detailed loan information for a recurring expense.

Goals

All endpoints require Auth

GET /goals
List all financial goals.
POST /goals
Create a financial goal. Body: name, target_amount, deadline
GET /goals/{id}
Get goal details.
PUT /goals/{id}
Update a goal.
DELETE /goals/{id}
Delete a goal.
PATCH /goals/{id}/progress
Update goal progress. Body: current_amount

Stats

All endpoints require Auth

GET /transactions/stats
Get spending statistics. Query: start_date, end_date. Returns overview, financial health, and category breakdown.
GET /stats/yearly-comparison
Compare spending between two years. Query: previous_year, current_year

Import / Export

All endpoints require Auth

POST /import/upload
Upload a file (CSV/Excel) for import.
POST /import/mappings
Save column mappings for import.
GET /import/mappings
Get saved import mappings.
DELETE /import/mappings/{id}
Delete an import mapping.
POST /import/transactions
Import transactions from uploaded file.
GET /transactions/export
Export transactions.
GET /export/status
Check the status of an ongoing export.

Chat

AI-powered chat. All endpoints require Auth

GET /chat
Get chat message history.
POST /chat
Send a chat message. Body: message

Feedback

All endpoints require Auth

POST /feedback
Submit feedback. Body: feedback (string)

Subscription

All endpoints require Auth

POST /polar/subscription/verify-session
Verify a Polar checkout session.
POST /polar/subscription/cancel
Cancel the active subscription.
GET /polar/subscription/status
Get current subscription status.
GET /polar/subscription/history
Get subscription history.

Settings

All endpoints require Auth

GET /settings
Get user settings.
PUT /settings/{id}
Update user settings.
GET /currencies
List available currencies.

Authentication

All endpoints marked with Auth require a Bearer token in the Authorization header:

Authorization: Bearer your-token-here

Get a token by calling POST /login, POST /auth/verify-otp, or POST /auth/google/callback.