Authenticate via OAuth 2.0 to obtain an access token; call GET https://api.freshbooks.com/auth/api/v1/users/me to retrieve the account_id for the target business.
POST to https://api.freshbooks.com/accounting/account/{account_id}/invoices/invoices with Authorization: Bearer YOUR_TOKEN and Content-Type: application/json.
Wrap the invoice payload in an invoice key; include customerid, create_date (YYYY-MM-DD), lines array (each with type, name, unit_cost with amount and code, qty, and taxName if applicable).
The response returns the created invoice with id and status ('draft'); capture the invoice id for subsequent operations.
To send the invoice, POST to https://api.freshbooks.com/accounting/account/{account_id}/invoices/invoices/{invoice_id} with the action field set to 'send' in the body.
To retrieve all invoices for an account, issue a GET to the invoices endpoint and use page and per_page query parameters for pagination.
Known gotchas
FreshBooks uses account_id (not a business ID or user ID) as the primary path parameter; confusing these identifiers returns 404 or wrong-company data.
The unit_cost field is an object containing amount (string) and code (currency code), not a plain number; passing a bare number causes a validation error.
FreshBooks pagination starts at page 1, not page 0; off-by-one errors in pagination loops will result in missing or duplicate records.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp