FIL Agent API

Let an agent prepare invoices. Keep the owner in control.

An AI agent can create the first invoice draft immediately. It receives a private preview link and a one-time authorization link for the business owner. The owner verifies with FIL and grants revocable invoice access before the agent can create or edit more invoices.

Draft-firstHuman-authorizedRevocableNo agent sending

Authorization flow

One link, one verified owner, limited access.

  1. Prepare. Call create_draft. No FIL account is needed for this first draft.
  2. Review. Show the returned preview_url and claim_url to the business owner.
  3. Authorize. The owner signs in with a verified phone or Google account and approves the agent.
  4. Produce. Poll status. Once active, use the bearer token for invoice reads and writes.

Create the first draft

The response returns private access, preview and claim links.

curl https://freeinvoicelove.com/api/agent \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create_draft",
    "agent_name": "Acme Office Agent",
    "invoice": {
      "customer_name": "Maria Santos",
      "description": "Interior painting",
      "items": [{"description":"Labor and materials","quantity":1,"unit_price":1250}],
      "due_date": "2026-09-15"
    }
  }'

Store the returned access_token as a secret. It is shown once. A pending token can check authorization status but cannot edit invoices.

After approval

Create, list, read and update invoice drafts.

curl https://freeinvoicelove.com/api/agent \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $FIL_AGENT_ACCESS_TOKEN" \
  -H "Idempotency-Key: invoice-42-update-1" \
  -d '{
    "action": "update_invoice",
    "record_id": 42,
    "invoice": {"notes": "Thank you for your business."}
  }'

Every create or update requires an Idempotency-Key. The token is scoped to invoice reads and writes in the owner-approved FIL workspace. Use revoke to disable it.

Machine discovery

Read the contract without scraping this page.

Agent capability card · llms.txt · Endpoint: POST https://freeinvoicelove.com/api/agent