Flito docs

CLI

flito api, a small command line over the REST API.

flito api finds and calls capabilities from a terminal, and prints results as JSON for scripts. It runs from a checkout of the Flito repository, with Node 22 or later.

Set up

export FLITO_URL=https://crm.yourcompany.com
export FLITO_API_KEY=flito_pat_…

Commands

pnpm flito api discover                       # the workspace and what the key can do
pnpm flito api list quote                     # capabilities whose id, name or description match
pnpm flito api describe quote.get             # one capability: what it does, scopes, input schema
pnpm flito api call quote.list '{"limit":5}'  # run it and print the result as JSON
  • list takes any words and shows each match as read or write.
  • describe says when a capability needs --approved.
  • call takes the input as JSON text, @file.json, or - to read standard input.

Changes that need approval

Add --approved once you are sure:

pnpm flito api call company.archive '{"id":"cmp_…"}' --approved

In scripts

call prints the result as JSON, so it pipes into jq:

pnpm --silent flito api call contact.list '{"search":"acme.com","limit":200}' \
  | jq -r '.rows[] | [.firstName, .lastName, .email] | @tsv'
Inputs from a file
echo '{"title": "Review the Acme quote", "priority": "high"}' > task.json
pnpm --silent flito api call task.create @task.json

A failed call prints the error and exits with a non-zero status, so set -e stops a script on the first failure.

Was this page useful?

On this page