{"openapi":"3.1.0","info":{"title":"inbill.dev — user HTTP API","version":"1.0.0","description":"Invoice extraction and saved-invoice CRUD. Authenticate with Authorization: Bearer and an API key (bf_live_…) or session JWT. See /docs/api for full narrative and examples."},"servers":[{"url":"https://inbill.dev"}],"paths":{"/api/extract-invoice":{"post":{"operationId":"extractInvoice","summary":"POST Extract invoice from a public file URL (JSON body)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success — see product docs for response shape"},"400":{"description":"Validation or unsupported file"},"401":{"description":"Missing or invalid bearer token"},"402":{"description":"Quota exceeded"},"404":{"description":"Not found (where applicable)"},"422":{"description":"Fetch or extraction failed (where applicable)"},"500":{"description":"Server error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["file_url"],"properties":{"file_url":{"type":"string","format":"uri"},"invoice_kind":{"type":"string","enum":["expense","revenue"],"default":"expense"}}}}}}}},"/api/extract-invoice-file":{"post":{"operationId":"extractInvoiceFile","summary":"POST Extract invoice from uploaded file (multipart)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success — see product docs for response shape"},"400":{"description":"Validation or unsupported file"},"401":{"description":"Missing or invalid bearer token"},"402":{"description":"Quota exceeded"},"404":{"description":"Not found (where applicable)"},"422":{"description":"Fetch or extraction failed (where applicable)"},"500":{"description":"Server error"}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"invoice_kind":{"type":"string","enum":["expense","revenue"],"default":"expense"}}}}}}}},"/api/invoices":{"get":{"operationId":"listInvoices","summary":"GET List saved invoices (pagination and filters)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success — see product docs for response shape"},"400":{"description":"Validation or unsupported file"},"401":{"description":"Missing or invalid bearer token"},"402":{"description":"Quota exceeded"},"404":{"description":"Not found (where applicable)"},"422":{"description":"Fetch or extraction failed (where applicable)"},"500":{"description":"Server error"}}}},"/api/invoices/{id}":{"get":{"operationId":"getInvoice","summary":"GET Get one saved invoice by id","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success — see product docs for response shape"},"400":{"description":"Validation or unsupported file"},"401":{"description":"Missing or invalid bearer token"},"402":{"description":"Quota exceeded"},"404":{"description":"Not found (where applicable)"},"422":{"description":"Fetch or extraction failed (where applicable)"},"500":{"description":"Server error"}}},"patch":{"operationId":"patchInvoice","summary":"PATCH Merge updates into a saved invoice","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success — see product docs for response shape"},"400":{"description":"Validation or unsupported file"},"401":{"description":"Missing or invalid bearer token"},"402":{"description":"Quota exceeded"},"404":{"description":"Not found (where applicable)"},"422":{"description":"Fetch or extraction failed (where applicable)"},"500":{"description":"Server error"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"invoice_kind":{"type":"string","enum":["expense","revenue"]},"parsed_data":{"type":"object","additionalProperties":true}}}}}}},"delete":{"operationId":"deleteInvoice","summary":"DELETE Delete a saved invoice","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success — see product docs for response shape"},"400":{"description":"Validation or unsupported file"},"401":{"description":"Missing or invalid bearer token"},"402":{"description":"Quota exceeded"},"404":{"description":"Not found (where applicable)"},"422":{"description":"Fetch or extraction failed (where applicable)"},"500":{"description":"Server error"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Dashboard API key (raw bf_live_… string) or Supabase session access_token (JWT)."}}},"security":[{"bearerAuth":[]}]}