Use the Freeagent CLI from KosmoKrator to call Freeagent tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
Freeagent can be configured headlessly with `kosmokrator integrations:configure freeagent`.
# 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 freeagent --set access_token="$FREEAGENT_ACCESS_TOKEN" --enable --read allow --write ask --jsonkosmokrator integrations:doctor freeagent --jsonkosmokrator integrations:status --json
Credentials
Authentication type: Manual OAuth tokenoauth2_manual_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
FREEAGENT_ACCESS_TOKEN
Secret secret
yes
Access Token
url
FREEAGENT_URL
URL url
no
API URL
Call Freeagent 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 Freeagent.
freeagent.freeagent_list_invoices
Read read
List invoices from FreeAgent. Returns a paginated list of invoices with their details. Supports filtering by status (Draft, Sent, Cancelled, Late Paid, Paid), date range, contact, and project.
Create a new invoice in FreeAgent. Requires a contact and at least one line item. Supports setting due date, currency, invoice items with quantities and prices, and comments.
Create a new contact in FreeAgent. Contacts can be customers, suppliers, or employees. Provide at least a name (first_name/last_name for individuals or organisation_name for companies).
Get the currently authenticated FreeAgent user profile. Returns user details like name, email, role, and company information. Useful for verifying the connection and understanding which account is active.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
freeagent.freeagent_list_invoices
List invoices from FreeAgent. Returns a paginated list of invoices with their details. Supports filtering by status (Draft, Sent, Cancelled, Late Paid, Paid), date range, contact, and project.
Create a new invoice in FreeAgent. Requires a contact and at least one line item. Supports setting due date, currency, invoice items with quantities and prices, and comments.
Create a new contact in FreeAgent. Contacts can be customers, suppliers, or employees. Provide at least a name (first_name/last_name for individuals or organisation_name for companies).
Start date for filtering (ISO 8601, e.g., "2025-01-01").
to_date
string
no
End date for filtering (ISO 8601, e.g., "2025-12-31").
contact
string
no
Filter by contact URL or ID.
project
string
no
Filter by project URL or ID.
page
integer
no
Page number for pagination.
per_page
integer
no
Number of results per page (default: 30).
freeagent.freeagent_get_current_user
Get the currently authenticated FreeAgent user profile. Returns user details like name, email, role, and company information. Useful for verifying the connection and understanding which account is active.
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.