API Documentation
Fyxi provides a REST API that lets you programmatically access your receipts, analytics, and AI analysis capabilities. All endpoints are prefixed with /api/v1.
Authentication
Generate an API key in Settings → API Keys. Pass it in the request header:
Authorization: Bearer tw_live_xxxxxxxxxxxxxxxxxxxx # Or using X-API-Key header: X-API-Key: tw_live_xxxxxxxxxxxxxxxxxxxx
All requests must be made over HTTPS. Requests without valid authentication return 401 Unauthorized.
Tickets
Retrieve your receipt and invoice records.
GET
/api/v1/ticketsList all tickets for the authenticated user
GET
/api/v1/tickets/:idGet a single ticket by ID
Example response:
{
"data": [
{
"_id": "abc123",
"provider": "Whole Foods Market",
"date": "2026-05-15",
"amount": 47.82,
"subtotal": 44.70,
"tax": 3.12,
"category": "Food",
"paymentMethod": "Credit Card",
"confidence": 0.97,
"items": [
{ "name": "Organic Milk", "qty": 1, "price": 4.99 },
{ "name": "Avocados", "qty": 4, "price": 1.50 }
]
}
],
"count": 1
}Stats
GET
/api/v1/statsGet spending statistics aggregated by category
{
"data": {
"totalAmount": 1248.50,
"totalTickets": 47,
"byCategory": {
"Food": 412.30,
"Transport": 178.00,
"Technology": 320.00
}
}
}Analyze Receipt
Submit a receipt image URL for AI extraction without saving it to your account.
POST
/api/analyze-receiptAnalyze a receipt image with Gemini AI
# Request
POST /api/analyze-receipt
Content-Type: application/json
Authorization: Bearer tw_live_...
{
"imageUrl": "https://your-bucket.r2.dev/receipt.jpg"
}
# Response
{
"provider": "Starbucks",
"date": "2026-05-29",
"amount": 8.75,
"subtotal": 8.25,
"tax": 0.50,
"category": "Food",
"paymentMethod": "Credit Card",
"confidence": 0.99,
"items": [
{ "name": "Grande Latte", "qty": 1, "price": 5.75 },
{ "name": "Croissant", "qty": 1, "price": 2.50 }
]
}