Use the FreshBooks CLI from KosmoKrator to call FreshBooks tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
FreshBooks can be configured headlessly with `kosmokrator integrations:configure freshbooks`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure freshbooks --set access_token="$FRESHBOOKS_ACCESS_TOKEN" --set account_id="$FRESHBOOKS_ACCOUNT_ID" --enable --read allow --write ask --jsonkosmokrator integrations:doctor freshbooks --jsonkosmokrator integrations:status --json
Credentials
Authentication type: Bearer tokenbearer_token. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
access_token
FRESHBOOKS_ACCESS_TOKEN
Secret secret
yes
Access Token
account_id
FRESHBOOKS_ACCOUNT_ID
Text text
yes
Account ID
url
FRESHBOOKS_URL
URL url
no
API Base URL
Call FreshBooks Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to FreshBooks.
freshbooks.freshbooks_list_invoices
Read read
List invoices from FreshBooks. Returns invoice details including status, amounts, client info, and dates. Supports filtering by status, client, date range, and more.
Create a new invoice in FreshBooks. Requires at minimum a client ID and line items. Supports setting due date, notes, discount, and other invoice fields.
List projects from FreshBooks. Returns project details including title, description, billing method, budget, and active status. Supports filtering and pagination.
Get the profile of the currently authenticated FreshBooks user. Returns user details including name, email, and linked business/member information. Useful for verifying connection and identity.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
freshbooks.freshbooks_list_invoices
List invoices from FreshBooks. Returns invoice details including status, amounts, client info, and dates. Supports filtering by status, client, date range, and more.
Create a new invoice in FreshBooks. Requires at minimum a client ID and line items. Supports setting due date, notes, discount, and other invoice fields.
List projects from FreshBooks. Returns project details including title, description, billing method, budget, and active status. Supports filtering and pagination.
Search filters. Keys: clientid, invoiceid, date_from, date_to, type (check/credit/card/bank). Pass as an object.
page
integer
no
Page number for pagination (default: 1).
per_page
integer
no
Results per page (default: 15, max: 100).
freshbooks.freshbooks_get_current_user
Get the profile of the currently authenticated FreshBooks user. Returns user details including name, email, and linked business/member information. Useful for verifying connection and identity.
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.