Skip to main content

API Endpoints

All endpoints are prefixed with the Edge Function base URL. See API Overview for the full base URL format.

Clients

MethodEndpointDescription
GET/clientsList all clients
POST/clientsCreate a new client
GET/clients/:idGet a single client
PATCH/clients/:idUpdate a client
DELETE/clients/:idDelete a client

Sessions

MethodEndpointDescription
GET/sessionsList all sessions
POST/sessionsCreate a new session
GET/sessions/:idGet a single session
PATCH/sessions/:idUpdate a session

Invoices

MethodEndpointDescription
GET/invoicesList all invoices
POST/invoicesCreate a new invoice
GET/invoices/:idGet a single invoice
PATCH/invoices/:idUpdate an invoice
POST/invoices/:id/sendSend invoice to client
Finalized Invoice Immutability

Finalized (sent or paid) invoices cannot be deleted. To reverse a charge, create a Credit Note via POST /invoices/:id/credit-note.

Contracts

MethodEndpointDescription
GET/contractsList all contracts
POST/contractsCreate a contract
GET/contracts/:idGet a single contract
POST/contracts/:id/sendSend for signature
POST/contracts/:id/signRecord a signature

Quotes

MethodEndpointDescription
GET/quotesList all quotes
POST/quotesCreate a quote
GET/quotes/:idGet a single quote
POST/quotes/:id/convertConvert to invoice

Account

MethodEndpointDescription
GET/accountGet current user account
PATCH/accountUpdate account settings
DELETE/accountDelete account and all data

Admin

MethodEndpointDescription
DELETE/admin/delete-test-dataPurge test-generated data (superadmin only)

Error Responses

All errors return a JSON body:

{
"error": "Human-readable error message",
"code": "ERROR_CODE"
}
HTTP StatusMeaning
400Bad request — invalid input
401Unauthorized — missing or expired token
403Forbidden — insufficient permissions
404Not found
409Conflict — e.g., duplicate email
503Service temporarily unavailable — retry with backoff