Base URL
https://freebillgen.com/api/v1
How you go prove say na your account
Every request need Bearer token. Create one for Settings → For developers, then choose «Read only» or «Read and write». You fit set when e go expire if you want. Send the token with every request:
Authorization: Bearer <your-api-key>We check say each request belong to the account wey create the key. We also check wetin the key fit do. Keep your token secret, and revoke am if anybody else don see am or you no need am again.
Wetin you fit do
- Read invoices, clients, companies, payments and schedules for recurring invoices
- You fit create and update dem (write API for Pro)
- Get VAT reports or reports wey group unpaid amounts by when dem suppose pay, as JSON
- Read the same Next actions list wey the dashboard use. The list get limit.
- Read bills, payment receipts and copies of sales invoices for Smart Inbox. You fit see the type, supplier, where dem come from and when dem pay.
- Download generic OASIS UBL and UN/CEFACT CII mappings for review (no profile validation)
- You fit register webhook endpoints for invoice and payment events (Pro)
- Use Idempotency-Key for write requests wey support am. If you change request data but keep the same key, you go get 409.
- Cursor pagination through links.next, and you fit adjust am with per_page (max 100)
- Make AI agents fit read any shared invoice: schema.org/Invoice JSON-LD, plus Accept: application/json or text/markdown on every signed share link
- MCP server for AI agents dey at https://freebillgen.com/api/mcp (get_invoice, verify_invoice). Na read-only server, and you no need authentication to use am.
How the API dey work
- Idempotency
- For create and action calls wey support am, send a unique Idempotency-Key. If you try again with the same request data, you go get the same success response wey you get the first time. If you use the same key but change the request data, you go get 409.
- Pagination
- For lists of resources wey don save, the API dey use cursor pagination. Follow links.next or pass ?cursor=... to get the next page. You fit use ?per_page= to set how many results go dey each page (max 100). The action feed get limit, and e dey show wetin the limit be and whether dem don cut the results short.
- Money
- Money amounts na exact JSON strings. The number of decimal places follow ISO 4217 rules for that currency, like «121.00» for EUR or «500» for JPY. Unit prices fit keep extra decimal places wey you enter.
- IDs
- Use the ID the API give you to refer to each resource. E no be number wey follow sequence.
Example: how to list your invoices
curl https://freebillgen.com/api/v1/invoices \
-H "Authorization: Bearer $FREEBILLGEN_API_KEY"
Open the complete interactive API reference →
Questions about the invoice API
Invoice API dey free?
Yes. API to read data dey free. You fit choose Pro if you need the write API or webhooks wey send updates comot. Check the pricing page for the price and payment options.
How I go prove say I get access?
Create Bearer token for Settings → For developers. Choose «Read only» or «Read and write». Send am for the Authorization: Bearer header with every request. Keys only get access to your account. You fit revoke dem or set when dem go expire.
I fit create invoices with code?
Yes. Write API dey part of Pro. E make the same professional invoices as the web app. The server dey number invoices in sequence and apply the VAT settings you choose. The API no confirm say your invoice follow local law.
How I go make sure say I no create the same invoice twice when I try again?
Send unique Idempotency-Key with your request to create the invoice. If you send the same data with the same key again, you go get the original result. If you change the data but use the same key, you go get 409, instead of result from a different invoice.
I fit read invoices wey I don receive?
Yes, free. GET /api/v1/inbox go list the bills, payment receipts and sales copies wey dey inside your Smart Inbox. Dem come by email, upload or as e-invoice files. Each one show the kind, direction, supplier, source and date wey dem pay. GET /api/v1/inbox/{id} go return one. FreeBillGen no be Peppol or government-network receiving endpoint.
AI agent fit read an invoice without account?
Yes. AI agent fit use the same URL to read any invoice wey you share through its signed public link. The page get schema.org/Invoice JSON-LD inside. If you send Accept: application/json, you go get structured invoice data: the parties, line items, totals, total wey remain to pay and payment options. If you send Accept: text/markdown, you go get a clean version wey use few tokens. Model Context Protocol (MCP) server also dey at https://freebillgen.com/api/mcp, with get_invoice and verify_invoice tools. Na read-only server, and you no need authentication to use am. The link signature na the access token. Keep the full URL secret because anybody wey get am fit open the invoice.