> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# FreshBooks

**Authentication:** OAuth. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Sample use cases

* List every invoice over 30 days past due, sorted by amount.
* Send a payment reminder to clients whose invoice was due last week.
* Pull total revenue by client for Q1 and rank by largest.

## Available Tools

#### list\_clients

List all clients. Supports pagination and filtering by email or organization.

#### get\_client

Get a specific client by ID with full details including contact info and outstanding balance.

#### create\_client\_tool

Create a new client. Provide at least an email or organization name.

#### update\_client

Update a client's information. Only provided fields will be updated.

#### delete\_client

Delete a client by setting their visibility state to deleted.

#### list\_expenses

List all expenses. Supports pagination and filtering by category or client.

#### get\_expense

Get a specific expense by ID with full details including category and tax info.

#### create\_expense

Create a new expense. Requires categoryid, amount, date, and staffid.

#### update\_expense

Update an expense. Only provided fields will be updated.

#### delete\_expense

Delete an expense by setting its visibility state to deleted.

#### list\_invoices

List all invoices. Supports pagination and filtering by status or client ID.

#### get\_invoice

Get a specific invoice by ID with full details including line items and payment status.

#### create\_invoice

Create a new invoice. Requires customerid, create\_date, and at least one line item.

#### update\_invoice

Update an invoice. Only provided fields will be updated.

#### delete\_invoice

Delete an invoice by setting its visibility state to deleted.

#### send\_invoice

Send an invoice by email to specified recipients.

#### mark\_invoice\_sent

Mark an invoice as sent without actually sending an email.

#### list\_items

List all billable items/services. Supports pagination.

#### get\_item

Get a specific billable item by ID with full details.

#### create\_item

Create a new billable item/service. Requires name and unit\_cost.

#### update\_item

Update a billable item. Only provided fields will be updated.

#### delete\_item

Delete a billable item by setting its visibility state to deleted.

#### list\_payments

List all payments. Supports pagination and filtering by invoice or client.

#### get\_payment

Get a specific payment by ID with full details.

#### create\_payment

Create a new payment. Requires invoiceid, amount, and date.

#### update\_payment

Update a payment. Only provided fields will be updated.

#### delete\_payment

Delete a payment by setting its visibility state to deleted.

#### list\_projects

List all projects. Requires business\_id. Supports pagination and filtering by active status.

#### get\_project

Get a specific project by ID with full details. Requires business\_id.

#### create\_project

Create a new project. Requires business\_id and title.

#### update\_project

Update a project. Requires business\_id. Only provided fields will be updated.

#### delete\_project

Delete a project. Requires business\_id.

#### list\_time\_entries

List all time entries. Requires business\_id. Supports pagination and filtering by project or date range.

#### get\_time\_entry

Get a specific time entry by ID with full details. Requires business\_id.

#### create\_time\_entry

Create a new time entry. Requires business\_id and started\_at. Either duration or a running timer is required.

#### update\_time\_entry

Update a time entry. Requires business\_id. Only provided fields will be updated.

#### delete\_time\_entry

Delete a time entry. Requires business\_id.