Finance and payments
FreshBooks in your product and your AI agents, through one API
The FreshBooks toolkit covers clients, invoices, payments received, expenses and expense categories of a business. Your customer connects FreshBooks once with OAuth, and your product or AI agent runs each operation through Connect, which stores and renews the credentials and logs every execution.
15 days to try it. No credit card.
POST https://connect.reportei.com/api/tools/freshbooks_create_client/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"account_id": "<account_id>",
"client": {}
}
}How it works
From a connected customer to the first FreshBooks call.
- 1
Your customer connects the account
Your system opens a Connect session for the toolkit and your customer connects their FreshBooks account. You get the connection id.
- 2
Your product calls the tool
A POST to /api/tools/{tool}/execute with the connection id and arguments. On success, Connect preserves the app's response status and body.
- 3
Connect handles the rest
It stores the credential encrypted, renews tokens for OAuth connections that support renewal and records executions in an audit trail available through the API.
Use cases
What your product does with FreshBooks.
Bill from your own product
Create a client, build a draft invoice and call Send invoice to email it, so billing started in your app lands in FreshBooks.
Record payments automatically
When a payment clears elsewhere, create a payment on the invoice so it turns partial or paid in the customer's books.
Agent files expenses
An AI agent lists expense categories and creates an expense with the right categoryid from a receipt a user sends.
Tools
14 FreshBooks tools
- Get current userGETReturns the connected user. Each item of business_memberships has the role of the user and a business with its name and account_id, the account_id every other tool asks for. A business without account_id has no accounting, and the other tools do not work on it.
- List clientsGETLists the active and archived clients of a business, with id, names, organization, email, phones, address and currency. The response has result.clients, page, pages and total: raise page until it reaches pages.
- Create clientPOSTCreates a client and returns it in result.client, with the id that invoices use as customerid and expenses as clientid. The fields go inside client.
- Update clientPUTChanges the fields sent on a client; the others stay as they are. The fields go inside client.
- List invoicesGETLists the active and archived invoices of a business, without their lines: id, invoice_number, customerid, organization, create_date, due_date, amount, outstanding, paid, v3_status and payment_status. The response has result.invoices, page, pages and total: raise page until it reaches pages.
- Get invoiceGETReturns one invoice in result.invoice, without its lines: number, client, dates, amount, outstanding, paid, discount, notes, terms, v3_status and payment_status.
- Create invoicePOSTCreates a draft invoice and returns it in result.invoice. The fields go inside invoice, which needs customerid and create_date; the lines set the amount. A draft does not count in the reports and the client cannot open it: Send invoice emails it or marks it as sent.
- Update invoicePUTChanges the fields sent on an invoice, like dates, number, notes, terms or discount; the others stay as they are. The fields go inside invoice. Lines are not changed here: a PUT with lines replaces all of them, and no tool reads the current lines.
- Send invoicePUTEmails an invoice to email_recipients, with action_email true, or only marks it as sent, with action_mark_as_sent true for an invoice delivered another way. Either way it leaves draft and starts counting in the reports. Send one of the two actions and no other invoice field: FreshBooks ignores the rest.
- Create paymentPOSTRecords a payment received on an invoice, like a bank transfer or cash, and returns it in result.payment. The fields go inside payment, with invoiceid and amount. The invoice turns partial or paid according to the amount.
OAuth with your product's app
You register your product's OAuth app once, with POST /api/merchants/credentials/freshbooks, and your customer authorizes the account on a consent screen. Connect renews the token when it is about to expire.
Questions about the FreshBooks toolkit
Do I need to build against the FreshBooks API?
No. Connect ships 14 FreshBooks tools, described and ready. Your customer connects the account and your system calls every tool through the same endpoint, with the same request format.
How does my customer connect their FreshBooks account?
With the mode the toolkit accepts: OAuth with your product's app. Connect stores the credential encrypted and never returns it to your system.
Does it work with AI agents?
Yes. Each tool's input is described in JSON Schema, which your agent uses directly as a tool definition. The agent picks the tool and the arguments, and your system makes the call to Connect.
Does my customer need a Reportei account?
No. Your customer connects the account on a Connect screen, or your system sends the credential through the API, and they keep using only your product.
Toolkits in the same category
See all 100 toolkitsSee Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.

Conta Azul