[Cotlet](https://cotlet.dev/index.md) · [Integrations](https://cotlet.dev/integrations.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Use cases](https://cotlet.dev/use-cases.md) · [Security](https://cotlet.dev/security.md) · [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md) · [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [Contact](https://cotlet.dev/contact.md) · [Pricing](https://cotlet.dev/pricing.md) · [Sign up](https://cotlet.dev/signup)

# iFirma API and MCP server

> Yes. iFirma has a documented JSON API that issues invoices, lists them, records payments, sends them by email and to KSeF, and adds cost documents (checked 14 Oct 2026). It has no official MCP server in its documentation. Every request is signed with one of four keys (subscriber, invoice, receipt, expense), you activate API access in your account first, and 100 requests per minute and 15,000 per day apply.

Online invoicing and accounting for Polish sole traders and small companies: sales invoices, cost documents, contractors, payments and sending invoices to the KSeF e-invoicing system.

## What is the iFirma API?

Cotlet's iFirma API exposes 14 endpoints for your own iFirma account: list invoices, get invoice, get invoice PDF, list contractors, list KSeF purchase invoices, create contractor, save invoice draft, issue invoice, send invoice to KSeF, send invoice by email, record payment, book KSeF purchase invoice, add expense and send payment reminder. The list_invoices endpoint returns sales invoices for a date range, with totals, payment and KSeF status. Each endpoint takes simple JSON inputs like invoice_id, contractor_id or nip and works both as an operation of the ifirma_read or ifirma_write MCP tool for agents and as a REST call for scripts.

- **Category:** [Invoicing & freelance CRM](https://cotlet.dev/integrations/category/invoicing-freelance-crm.md)
- **Endpoints:** 14 (5 read, 9 write)
- **Updated:** 2026-10-20

Yes. Cotlet is a hosted MCP server and REST API for iFirma with 14 endpoints (5 read, 9 write): you sign in once in your own cloud browser, your AI agent does the work.

## Does iFirma have an official API?

Yes. iFirma has a documented JSON API that issues invoices, lists them, records payments, sends them by email and to KSeF, and adds cost documents (checked 14 Oct 2026). It has no official MCP server in its documentation. Every request is signed with one of four keys (subscriber, invoice, receipt, expense), you activate API access in your account first, and 100 requests per minute and 15,000 per day apply.

| Task | iFirma official | Cotlet |
|---|---|---|
| List invoices and filter unpaid ones | Yes: GET faktury.json with status nieoplacone, przeterminowane or oplaconeCzesciowo | Yes |
| Issue a domestic invoice | Yes: POST fakturakraj.json with the invoice key; other invoice types have their own endpoints | Yes |
| Send an invoice by email | Yes: POST send endpoint per invoice type | Yes |
| Send an invoice to KSeF and read its status | Yes: Since 1 Feb 2026; KsefStatus and KsefNumber are in the invoice list | Yes |
| Record a payment on an invoice | Yes: POST wplaty endpoint with the amount | Yes |
| Add a cost document | Yes: Four expense endpoints; KSeF marking is a field | Yes |
| Download purchase invoices from KSeF and book them | No: In the app under Wydatki, not in the API docs | Yes |
| Send a payment reminder | No: In the app under Windykacja, not in the API docs | Yes |

Sources: [iFirma API: general information and limits](https://api.ifirma.pl/), [iFirma API: activation](https://api.ifirma.pl/aktywacja-api/), [iFirma API: authorization header](https://api.ifirma.pl/naglowek-autoryzacji/), [iFirma API: sending an invoice to KSeF](https://api.ifirma.pl/wysylanie-faktury-do-ksef/)

## For AI agents

```text
Yes. iFirma has a documented JSON API that issues invoices, lists them, records payments, sends them by email and to KSeF, and adds cost documents (checked 14 Oct 2026). It has no official MCP server in its documentation. Every request is signed with one of four keys (subscriber, invoice, receipt, expense), you activate API access in your account first, and 100 requests per minute and 15,000 per day apply.
Cotlet provides a hosted MCP server and REST API for iFirma: 14 tools (5 read, 9 write).
Access       Sign up at https://cotlet.dev/app/signup?app=ifirma, then request the app and create API keys in the Cotlet console.

MCP server   https://cotlet.dev/mcp/v1
MCP tools    ifirma_read, ifirma_write, reads and writes apart; call one with {"operation": "<operation>", "arguments": {...}}
REST base    https://cotlet.dev/api/v1/ifirma, each operation at its own route, e.g. POST /api/v1/ifirma/contractors/{contractor_id}/invoices
Auth         Authorization: Bearer <COTLET_API_KEY>. Listing endpoints and schemas needs no key; calling an endpoint needs one. Over MCP the input schemas come with sign-in.
Operations   list_invoices, get_invoice, get_invoice_pdf, list_contractors, list_ksef_purchase_invoices, create_contractor, save_invoice_draft, issue_invoice, send_invoice_to_ksef, send_invoice_email, record_payment, book_ksef_purchase_invoice, add_expense, send_payment_reminder
Confirm      issue_invoice, send_invoice_to_ksef, send_invoice_email, record_payment, book_ksef_purchase_invoice, add_expense, send_payment_reminder (by default the user approves each call; the user can switch this off per tool, e.g. for scheduled automations)
Markdown     https://cotlet.dev/integrations/ifirma-api-mcp-server.md

How access works:
1. The user signs up at https://cotlet.dev/app/signup?app=ifirma, requests iFirma in the Cotlet console and creates an API key there.
2. The user signs in to iFirma once in their Cotlet Cloud Browser (their own Chrome in the cloud, opened from the console) and enables iFirma for agents. An agent cannot do this step.
3. The API key goes into the MCP client or the REST call as a bearer token.

Fits: people who want a hosted iFirma server that someone else maintains, including non-developers.

Policy: Cotlet never stores passwords, never solves CAPTCHAs, never bypasses MFA.
Company: legal details in the Terms of service at https://cotlet.dev/terms. Contact contact@cotlet.dev.
Sign-in: the user signs in to iFirma in their own Cloud Browser, a Chrome Cotlet runs for them in the EU; password saving is off, the profile is AES-256-GCM encrypted, and agents get iFirma only after the user enables it. Calls are requests from that browser's IP with its cookies, each listed in the user's Background activity. Disable for agents, signing out in the browser or Reset browser cuts access. Cotlet is run by Take Group sp. z o.o. (EU VAT PL6342984273).
API key: holds no iFirma login or cookies, only asks Cotlet to run a tool. Each key is scoped to chosen apps and tools, read only or read and write. Actions that reach other people wait for the user's approval by default, so a leaked key cannot post or message as the user. Every call is in the activity log; deleting the key ends access at once.
Terms: the user stays responsible for following iFirma's terms; Cotlet is not affiliated with iFirma.
```

## What can an AI agent do in iFirma?

Cotlet is best for Polish sole traders and small businesses on iFirma who want their AI agent to issue invoices, send them to KSeF and chase payments without running or fixing a server.

- **[Issue an invoice and send it to KSeF](https://cotlet.dev/integrations/ifirma-api-mcp-server/issue-invoice-and-send-to-ksef.md)** (runs: daily): "Issue a domestic VAT invoice in iFirma for Blue Fern Studio: 2 x Website retainer, net 500.00 each, 23% VAT, due in 14 days. Find the contractor by NIP first. Show me the invoice before you issue it, then send it to KSeF and by email." → `list_contractors`, `issue_invoice`, `send_invoice_to_ksef`, `send_invoice_email`
- **[Book purchase invoices from KSeF as costs](https://cotlet.dev/integrations/ifirma-api-mcp-server/book-ksef-purchase-invoices.md)** (runs: weekly): "List the purchase invoices that arrived in KSeF since last Monday and are not booked yet. Book the ones from suppliers I already have as contractors and show me the rest." → `list_ksef_purchase_invoices`, `list_contractors`, `book_ksef_purchase_invoice`
- **[Chase unpaid invoices](https://cotlet.dev/integrations/ifirma-api-mcp-server/chase-unpaid-invoices.md)** (runs: weekly): "List my overdue iFirma invoices. For each one, send a Monit to the buyer, except invoices under 100 PLN, and tell me the total still owed per contractor." → `list_invoices`, `send_payment_reminder`
- **Record payments on invoices** (runs: weekly): "Here are this week's incoming transfers. For each one find the unpaid iFirma invoice with the same number and amount, record the payment, and list the transfers that did not match." → `list_invoices`, `record_payment`
- **Add a supplier cost document**: "Add this phone bill to iFirma as a phone and internet cost: invoice 2026/10/0042 from Telco Sp. z o.o., issued 2026-10-09, net 81.30, VAT 18.70, no KSeF number." → `list_contractors`, `add_expense`

## Can iFirma automations run on a schedule in n8n, Make or Zapier?

Yes. Cotlet does not replace your automation platform: it gives it a iFirma connection it does not have, with the same API key as your agent. Write actions ask for your OK by default; switch that off in your dashboard for the tools you choose, for example to issue an invoice and send it to ksef, and the schedule runs on its own. Cotlet runs in the cloud, so it keeps going while your computer is off.

| Where | How to connect | How to schedule |
|---|---|---|
| Your AI agent | Add https://cotlet.dev/mcp/v1 with your API key. | A scheduled agent run, for example a Claude Code routine. |
| n8n | MCP Client node with https://cotlet.dev/mcp/v1, or an HTTP Request node with the endpoint's method and URL, such as GET https://cotlet.dev/api/v1/ifirma/contractors. | Schedule Trigger node. |
| Make | HTTP module: the endpoint's method and URL with an Authorization: Bearer header, and a JSON body for POST, PUT and PATCH. | Scenario schedule. |
| Zapier | Webhooks by Zapier, Custom Request: the same method, URL, header and body. | Schedule by Zapier trigger. |
| Your own script | GET https://cotlet.dev/api/v1/ifirma/contractors with your API key. | cron or GitHub Actions. |

## Tools

**For AI agents:** Every endpoint and its schema is public. The 14 endpoints on this page, with parameters and example responses, can be listed without an account. Calling one returns 401 without an API key and 403 while the key has no access to iFirma.

### list_invoices

Sales invoices for a date range, with totals, payment and KSeF status. Access: read. REST: `GET /api/v1/ifirma/invoices`. MCP: `ifirma_read → list_invoices`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `date_from` | string | yes | YYYY-MM-DD, the first issue date. |
| `date_to` | string | no | YYYY-MM-DD. Default: 30 days after date_from. |
| `status` | string | no | overdue, unpaid, partly_paid or paid. Several values can be joined with commas. |
| `contractor_id` | string | no | Contractor ID from list_contractors. |
| `nip` | string | no | Buyer tax number (NIP). |
| `min_amount` | number | no | Smallest document value. |
| `max_amount` | number | no | Largest document value. |
| `page` | integer | no | Page number. Default: 1. |
| `per_page` | integer | no | Results per page. Default: 20. |

Returns invoices issued in the range you choose. Each item has number, buyer, issue and due date, gross amount, currency, amount paid, draft and sent flags, and the KSeF number and status. Without date_to the range is 30 days from date_from. Pages hold 20 results unless you set per_page.

Example response:

```json
{
  "invoices": [
    {
      "id": 7020118,
      "number": "41/2026",
      "buyer": "Blue Fern Studio",
      "contractor_id": "c_4817",
      "issue_date": "2026-10-14",
      "due_date": "2026-10-28",
      "gross": 1230,
      "currency": "PLN",
      "paid": 0,
      "draft": false,
      "sent": false,
      "ksef_status": null
    },
    {
      "id": 7020104,
      "number": "39/2026",
      "buyer": "Harbor Print Ltd",
      "contractor_id": "c_4832",
      "issue_date": "2026-09-18",
      "due_date": "2026-10-02",
      "gross": 800,
      "currency": "PLN",
      "paid": 0,
      "draft": false,
      "sent": true,
      "ksef_status": "accepted"
    }
  ],
  "page": 1
}
```

### get_invoice

One invoice with its lines, buyer, payments and KSeF status. Access: read. REST: `GET /api/v1/ifirma/invoices/{invoice_id}`. MCP: `ifirma_read → get_invoice`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `invoice_id` | integer | yes | Invoice ID from list_invoices. |

Returns one invoice as the app shows it: number, buyer, lines, net, VAT and gross totals, payments recorded, reminders and the KSeF number and status. Use it after send_invoice_to_ksef to see whether KSeF accepted the invoice.

Example response:

```json
{
  "id": 7020118,
  "number": "41/2026",
  "buyer": "Blue Fern Studio",
  "contractor_id": "c_4817",
  "lines": [
    {
      "name": "Website retainer",
      "quantity": 2,
      "unit": "month",
      "unit_price": 500,
      "vat_rate": 23
    }
  ],
  "net": 1000,
  "vat": 230,
  "gross": 1230,
  "currency": "PLN",
  "due_date": "2026-10-28",
  "paid": 0,
  "reminders": 0,
  "ksef_status": "queued",
  "ksef_number": null
}
```

### get_invoice_pdf

The invoice as a PDF file, base64 encoded. Access: read. REST: `GET /api/v1/ifirma/invoices/{invoice_id}/pdf`. MCP: `ifirma_read → get_invoice_pdf`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `invoice_id` | integer | yes | Invoice ID from list_invoices. |
| `duplicate` | boolean | no | true for a duplicate. Default: false. |

Returns the PDF of one issued invoice as base64 with its file name. Set duplicate to true for a duplicate, which carries the date it was downloaded.

Example response:

```json
{
  "invoice_id": 7020118,
  "file_name": "41-2026.pdf",
  "content_base64": "JVBERi0xLjQKJcfsj6IK..."
}
```

### list_contractors

Contractors from your list, searchable by name or tax number. Access: read. REST: `GET /api/v1/ifirma/contractors`. MCP: `ifirma_read → list_contractors`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | no | Contractor name or part of it. |
| `nip` | string | no | Tax number (NIP). |
| `page` | integer | no | Page number. Default: 1. |

Returns contractors saved under Firma, Kontrahenci. Search by NIP or name to find a buyer or supplier before you invoice or book a cost. Without a filter it returns the first page.

Example response:

```json
{
  "contractors": [
    {
      "id": "c_4817",
      "name": "Blue Fern Studio",
      "nip": "1234563218",
      "email": "billing@bluefern.example",
      "city": "Gdansk",
      "postal_code": "80-001",
      "country_code": "PL"
    }
  ],
  "page": 1
}
```

### list_ksef_purchase_invoices

Invoices that suppliers sent to you in KSeF and you have not booked yet. Access: read. REST: `GET /api/v1/ifirma/ksef-purchase-invoices`. MCP: `ifirma_read → list_ksef_purchase_invoices`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `issued_from` | string | yes | YYYY-MM-DD, the first seller issue date to download. |

Downloads new purchase invoices from KSeF into the "Faktury z KSeF" list and returns them. Each item has the seller document number, KSeF number, document type, seller NIP, issue date, and net and gross amounts. The date is the seller issue date, not the date sent to KSeF. Documents already booked are not returned.

Example response:

```json
{
  "invoices": [
    {
      "ksef_number": "7010003987-20261012-AB12CD34EF56-7A",
      "seller_number": "FV 118/2026",
      "type": "vat",
      "seller_nip": "7010003987",
      "issue_date": "2026-10-12",
      "net": 650.41,
      "gross": 800
    },
    {
      "ksef_number": "5252248481-20261010-9F8E7D6C5B4A-12",
      "seller_number": "ZAL 7/2026",
      "type": "advance",
      "seller_nip": "5252248481",
      "issue_date": "2026-10-10",
      "net": 2000,
      "gross": 2460
    }
  ]
}
```

### create_contractor

Add a contractor to your iFirma list. Access: write. REST: `POST /api/v1/ifirma/postals/{postal_code}/contractors`. MCP: `ifirma_write → create_contractor`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Contractor name, up to 150 characters. |
| `postal_code` | string | yes | Postal code. |
| `city` | string | yes | City. |
| `street` | string | no | Street and number. |
| `nip` | string | no | Tax number (NIP). |
| `country_code` | string | no | Two-letter country code. |
| `email` | string | no | Email address used for sending invoices and reminders. |
| `private_person` | boolean | no | true for a private person. Default: false. |

Creates a contractor record. Name, postal code and city are required. Nothing is sent to anyone, and the contractor can be edited or deleted in the app, so create_contractor runs without asking first.

Example response:

```json
{
  "id": "c_4901",
  "name": "Lime Courier Sp. z o.o.",
  "nip": "9512345678",
  "email": "office@limecourier.example",
  "city": "Warsaw",
  "postal_code": "00-001",
  "country_code": "PL"
}
```

### save_invoice_draft

Save an invoice as a draft without a number, to review and issue in the app. Access: write. REST: `POST /api/v1/ifirma/contractors/{contractor_id}/invoice-draft/save`. MCP: `ifirma_write → save_invoice_draft`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `contractor_id` | string | yes | Contractor ID from list_contractors or create_contractor. |
| `lines` | array | yes | Lines: {name, quantity, unit, unit_price, vat_rate}. vat_rate is 23, 8, 5, 0 or exempt. |
| `calculate_from` | string | no | net or gross: which price you give. Default: net. |
| `issue_date` | string | no | YYYY-MM-DD. Default: today. |
| `due_date` | string | no | YYYY-MM-DD. |

Does what "Zapisz szkic" does: saves the invoice without a number, and it shows in the invoice list. A draft reaches no one and can be edited or deleted in the app, so save_invoice_draft runs without asking first. It takes the same parameters as issue_invoice.

Example response:

```json
{
  "id": 7020119,
  "number": null,
  "draft": true,
  "buyer": "Blue Fern Studio",
  "gross": 1230,
  "currency": "PLN"
}
```

### issue_invoice

Issue a domestic invoice for a contractor with one or more lines. Access: write, asks the user first. REST: `POST /api/v1/ifirma/contractors/{contractor_id}/invoices`. MCP: `ifirma_write → issue_invoice`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `contractor_id` | string | yes | Contractor ID from list_contractors or create_contractor. |
| `lines` | array | yes | Lines: {name, quantity, unit, unit_price, vat_rate}. vat_rate is 23, 8, 5, 0 or exempt. |
| `calculate_from` | string | no | net or gross: which price you give. Default: net. |
| `issue_date` | string | no | YYYY-MM-DD. Default: today. |
| `sale_date` | string | no | YYYY-MM-DD. Default: issue date. |
| `due_date` | string | no | YYYY-MM-DD. |
| `payment_method` | string | no | transfer, cash or card. |
| `notes` | string | no | Remarks printed on the invoice, up to 1000 characters. |

Issues the invoice with the next number in the series, the same as "Wystaw". Lines need name, quantity, unit, unit price and VAT rate; a line that is not exempt may also need a PKWiU code. The invoice is not sent to KSeF or to the buyer until you call send_invoice_to_ksef or send_invoice_email. By default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "id": 7020118,
  "number": "41/2026",
  "draft": false,
  "buyer": "Blue Fern Studio",
  "net": 1000,
  "vat": 230,
  "gross": 1230,
  "currency": "PLN",
  "issue_date": "2026-10-14",
  "due_date": "2026-10-28",
  "ksef_status": null
}
```

### send_invoice_to_ksef

Send one issued invoice to the Polish KSeF e-invoicing system. Access: write, asks the user first. REST: `POST /api/v1/ifirma/invoices/{invoice_id}/to-ksef`. MCP: `ifirma_write → send_invoice_to_ksef`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `invoice_id` | integer | yes | Invoice ID from list_invoices. |

Does what "Wyślij do KSeF" does and returns the first status, "Przekazana do wysyłki"; the KSeF number appears once the Ministry of Finance accepts it, so read it with get_invoice. KSeF must already be connected in the account. After sending, iFirma does not allow editing or deleting the invoice, and the issue date cannot be later than the sending date. By default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "invoice_id": 7020118,
  "ksef_status": "queued",
  "ksef_number": null
}
```

### send_invoice_email

Email an issued invoice to the buyer, with the invoice attached. Access: write, asks the user first. REST: `POST /api/v1/ifirma/invoices/{invoice_id}/email`. MCP: `ifirma_write → send_invoice_email`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `invoice_id` | integer | yes | Invoice ID from list_invoices. |
| `recipient_email` | string | no | Default: the email on the contractor record. |
| `message` | string | no | Text put before the standard message, up to 1000 characters. |
| `include_transfer_details` | boolean | no | Add bank transfer payment information. Default: false. |

Sends one invoice to the buyer's address stored in the contractor record, or to recipient_email if you give one. The sender address and message template must be set in the account, otherwise iFirma uses its defaults. Sending an invoice by email without offline QR codes means it will not be entered into KSeF, so send to KSeF first. By default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "invoice_id": 7020118,
  "sent_to": "billing@bluefern.example",
  "sent": true
}
```

### record_payment

Record a payment received on an invoice. Access: write, asks the user first. REST: `POST /api/v1/ifirma/invoices/{invoice_id}/payments`. MCP: `ifirma_write → record_payment`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `invoice_id` | integer | yes | Invoice ID from list_invoices. |
| `amount` | number | yes | Amount received, at most the amount still owed. |
| `date` | string | no | YYYY-MM-DD the money arrived. Required for foreign-currency and cash-method invoices. |

Adds a payment to one invoice. The amount cannot be more than what is still owed on it. For a foreign-currency invoice or a cash-method invoice, the payment date is required. iFirma then shows the invoice as paid or partly paid. By default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "invoice_id": 7020104,
  "amount": 800,
  "remaining": 0,
  "status": "paid"
}
```

### book_ksef_purchase_invoice

Book a purchase invoice from KSeF as a cost. Access: write, asks the user first. REST: `POST /api/v1/ifirma/ksefs/{ksef_number}/purchase-invoice`. MCP: `ifirma_write → book_ksef_purchase_invoice`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `ksef_number` | string | yes | KSeF number from list_ksef_purchase_invoices. |

Does what "Zaksięguj" does on a document from list_ksef_purchase_invoices. It works for VAT and corrective invoices; advance and final invoices are booked in an order and are refused. The cost then appears in Wydatki, Lista wydatków. By default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "ksef_number": "7010003987-20261012-AB12CD34EF56-7A",
  "booked": true,
  "seller_number": "FV 118/2026",
  "gross": 800
}
```

### add_expense

Add a cost document by hand: goods purchase, business cost or phone and internet bill. Access: write, asks the user first. REST: `POST /api/v1/ifirma/invoices/{invoice_number}/expenses`. MCP: `ifirma_write → add_expense`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `type` | string | yes | goods_purchase, business_cost_invoice or phone_internet. |
| `invoice_number` | string | yes | Number printed on the supplier document. |
| `expense_name` | string | yes | Name of the expense. |
| `issue_date` | string | yes | YYYY-MM-DD. |
| `ksef_marking` | string | yes | number, offline, bfk or di. |
| `ksef_number` | string | no | Required when ksef_marking is number. |
| `contractor_id` | string | no | Contractor ID from list_contractors. |
| `net_23` | number | no | Net amount at 23%. The same for net_8, net_5, net_0 and net_exempt. |
| `vat_23` | number | no | VAT amount at 23%. The same for vat_8 and vat_5. |

Adds one cost document with the amounts per VAT rate. KSeF marking is required: number (with ksef_number), offline, bfk or di. The seller is matched by contractor_id or NIP. The cost goes into your records. By default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "id": 3310027,
  "type": "phone_internet",
  "invoice_number": "2026/10/0042",
  "net": 81.3,
  "vat": 18.7,
  "gross": 100
}
```

### send_payment_reminder

Email a Ponaglenie, Monit or Wezwanie do zapłaty for an unpaid invoice. Access: write, asks the user first. REST: `POST /api/v1/ifirma/invoices/{invoice_id}/payment-reminders`. MCP: `ifirma_write → send_payment_reminder`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `invoice_id` | integer | yes | Invoice ID from list_invoices. |
| `type` | string | yes | reminder, monit or demand. |
| `send_copy_to_me` | boolean | no | Copy to the seller email. Default: true. |

Creates the reminder from the invoice and emails it to the buyer with a PDF. reminder is before the due date, monit is after it, and demand is the formal Wezwanie do zapłaty, which iFirma recommends sending by registered letter. The seller gets a copy unless send_copy_to_me is false. By default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "invoice_id": 7020104,
  "type": "monit",
  "sent_to": "office@harborprint.example",
  "copy_sent_to_me": true
}
```

## How do I connect iFirma to Claude Code, Codex or Cursor?

Connecting iFirma takes three steps: sign up, sign in to iFirma once in your Cloud Browser and enable it for agents, then add one MCP server or call the REST API with the same key.

### Connect iFirma to your agent.

1. **Create an account** Sign up and add iFirma in the console. Your API key is there too.

2. **Sign in to iFirma in your Cloud Browser** Open your Cloud Browser in the console: your own Chrome in the cloud. Sign in to iFirma there yourself, the way you always do, then press Enable for agents, read only or read and write. We never save your password, and your agent keeps working even when your computer is off.

3. **Add Cotlet to your agent** Paste the snippet for your client. The same server and key serve every app you connect, so you do this once.

   Claude Code:

```
claude mcp add --transport http cotlet \
  https://cotlet.dev/mcp/v1 \
  --header "Authorization: Bearer $COTLET_API_KEY"
```

   Cursor:

```
{
  "mcpServers": {
    "cotlet": {
      "url": "https://cotlet.dev/mcp/v1",
      "headers": {
        "Authorization": "Bearer ${COTLET_API_KEY}"
      }
    }
  }
}
```

   Codex:

```
# ~/.codex/config.toml
[mcp_servers.cotlet]
url = "https://cotlet.dev/mcp/v1"
bearer_token_env_var = "COTLET_API_KEY"
```

4. **Ask your agent** Ask in plain words. Your agent finds the iFirma tools on the server and calls them for you; anything that reaches other people waits for your OK unless you switch that off for a tool.

```
Issue a domestic VAT invoice in iFirma for Blue Fern Studio: 2 x Website retainer, net 500.00 each, 23% VAT, due in 14 days. Find the contractor by NIP first. Show me the invoice before you issue it, then send it to KSeF and by email.
```

### Call iFirma from your scripts.

1. **Export your API key** Your scripts use the same API key as your agent. Keep it in an environment variable, never in your code.

```
export COTLET_API_KEY="cotlet_..."
```

2. **Call a tool** Every tool is an endpoint under /api/v1/ifirma with its own method and path, listed with the endpoints above. Path parameters go in the URL; the other parameters go in the query for GET and DELETE and in a JSON body otherwise.

```
curl -X POST https://cotlet.dev/api/v1/ifirma/contractors/c_4817/invoices \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"calculate_from":"net","issue_date":"2026-10-14","sale_date":"2026-10-14","due_date":"2026-10-28","payment_method":"transfer","lines":[{"name":"Website retainer","quantity":2,"unit":"month","unit_price":500,"vat_rate":23}]}'
```

3. **Read the result** You get plain JSON back, ready for your script. A failed call costs nothing.

```
{
  "id": 7020118,
  "number": "41/2026",
  "draft": false,
  "buyer": "Blue Fern Studio",
  "net": 1000,
  "vat": 230,
  "gross": 1230,
  "currency": "PLN",
  "issue_date": "2026-10-14",
  "due_date": "2026-10-28",
  "ksef_status": null
}
```

## Why use Cotlet for iFirma?

**Built for agents**

- One MCP server for every app you connect.
- The same tools as a REST API for scripts and cron jobs.
- Works with Claude Code, Codex and Cursor.

**Your login stays yours**

- You sign in to iFirma yourself, in your own Cloud Browser. We never save your password; the profile is encrypted with AES-256-GCM, the cipher 1Password uses.
- A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory.
- The model never sees a login.
- No stored passwords, no CAPTCHA solving, no MFA bypass.

**You stay in control**

- Scope each API key: its apps, its tools, read only or read and write.
- Anything that reaches other people waits for your OK, so a leaked key cannot post or message as you.
- Every background request listed in your Background activity. Disable for agents in one click.

**Kept working for you**

- We test every integration every 6 hours.
- When iFirma changes, the tool pauses until we fix it.
- Failed calls cost nothing.

## Is it safe to connect iFirma to Cotlet?

Yes. You sign in to iFirma yourself, in your own Cloud Browser, and we never save your password. Your agents only get iFirma once you enable it, and every background request is listed. The browser profile is stored encrypted with AES-256-GCM, the same cipher 1Password uses for its vaults and Apple for iCloud Keychain. Independent public scanners grade cotlet.dev A+ and find it clean; click a result to rerun it yourself.

- **A+ on Qualys SSL Labs**: Encryption in transit: TLS setup and certificates, on all four server addresses. [Live result](https://www.ssllabs.com/ssltest/analyze.html?d=cotlet.dev)
- **A+ on securityheaders.com**: Browser protections sent with every page, all six headers present. [Live result](https://securityheaders.com/?q=cotlet.dev&followRedirects=on)
- **A+ on Mozilla Observatory**: Mozilla's web security baseline: score 120 of 100, 12 of 12 tests passed. [Live result](https://developer.mozilla.org/en-US/observatory/analyze?host=cotlet.dev)
- **Clean on Sucuri SiteCheck**: No malware, spam or defacement, and not on any of 9 blocklists, Google Safe Browsing included. [Live result](https://sitecheck.sucuri.net/results/cotlet.dev)

[How Cotlet protects your access](https://cotlet.dev/security.md)

### Common concerns

**Who runs Cotlet?**

Cotlet is run by Take Group, a Polish software company working since 2019. Take Group runs about 3,200 websites on its own systems and has its own DevOps team for infrastructure security. We built and used integrations like this inside the company for years before opening them as Cotlet.

**Is this an official iFirma integration?**

No, Cotlet is independent of iFirma. iFirma's own API is too limited for this work. Cotlet works through your own iFirma account, the way you use iFirma in the browser, so you need no partner approval and no developer setup.

**What about client data and GDPR?**

Cotlet is run from the EU and follows the GDPR. Cloud Browsers run in Finland, a Tier 1 country in the ITU Global Cybersecurity Index 2024. Data passes through a call and is not kept after it.

**Can I start with read only?**

Yes. Enable the app for agents as read only, or make the API key read only, and anything that reaches other people waits for your OK unless you switch that off per tool.

**Is it reliable?**

Every Cotlet service is checked every 3 minutes from Europe, North America, Asia and Australia. The live results and any outage are public at status.cotlet.dev.

**How do I stop?**

Press Disable for agents next to iFirma in your console: your agents lose access at once and you stay signed in. Signing out of iFirma in the browser works too, and Reset browser deletes the whole profile.

## Is there a iFirma MCP server on GitHub?

Yes. Community iFirma MCP servers exist on npm and GitHub, usually maintained by one person. You install one on your own computer, give it your API keys, and keep it running yourself; when iFirma changes the API, it stops working until you or the maintainer fix it. The official API is the other route: you register for access and write the code. Cotlet hosts the same tools for you, with one key and one sign-in, and our team keeps them working.

|  | GitHub MCP server or the API | Cotlet |
|---|---|---|
| Setup | Activate API access, generate the keys, install the server or write signed requests, add it to each MCP client | Sign up, sign in to iFirma once, add one MCP server or API key |
| When iFirma changes | It breaks until you or the maintainer fix it | Our team tests it daily and fixes it for you; failed calls are free |
| Your iFirma access | API keys with account-wide rights, kept in a config file on your computer | Signed in inside your own Cloud Browser in the EU, profile encrypted, only for the apps you enable, disabled for agents in one click; no keys to paste |
| Features outside the API | Not available: KSeF purchase invoices and payment reminders have no API call | Included: the agent works in the app itself, so Wydatki and Windykacja are reachable |
| Upkeep | You update, monitor and debug it yourself | Nothing to host or update |
| Where it runs | Your computer, while it is on | Hosted: Claude Code, Codex, Cursor, n8n and scripts, also on a schedule |
| Price | Free, paid for with your time | Free 7-day trial, then pay-as-you-go credit packs, no subscription |

### Which one fits you

**Pick Cotlet if**

- you are not a developer, or you do not want to maintain a server
- you need it to keep working when iFirma changes, without checking it yourself
- your agent or a script should run it on a schedule, also while your computer is off

**Pick an open-source server if**

- you are comfortable installing, updating and fixing it yourself
- you want your sign-in to stay on your own computer
- you only need it now and then, from one MCP client

## How much does the iFirma API cost?

Free 7-day trial with 2,000 credits, no card needed. After that, the iFirma API is pay as you go with no limit on apps: Credit packs from $29 for 5,000 credits, one-time, no subscription. A successful call uses 20 to 30 credits (25 for most tools, about $0.10 to $0.15), your Cloud Browser uses 50 credits a day while it has an app enabled for agents, however many apps that is, and an agent driving the browser itself uses 5 credits a minute. Credit packs stay valid for 12 months and stack, so unused credits carry over.

| Credits | Price, one time | Calls at 25 credits | Per 1,000 credits |
|---|---|---|---|
| 5,000 | $29 | 200 | $5.80 |
| 15,000 | $79 | 600 | $5.27 |
| 32,000 | $149 | 1,280 | $4.66 |
| 60,000 | $249 | 2,400 | $4.15 |

Only successful calls use credits; failed calls and timeouts cost nothing. At a balance of 0 calls pause, never a surprise charge. Authenticate with the `Authorization: Bearer` header. [See full pricing](https://cotlet.dev/pricing.md)

## How Cotlet holds your access

Cotlet hosts MCP servers and REST APIs for apps with no usable API. Your agent works in your own iFirma account.

- **Company details:** Cotlet is run by Take Group sp. z o.o., a company registered in Poland. Its full address and registration numbers are in the Terms of service. [Terms of service](https://cotlet.dev/terms)
- **Your sign-in:** You sign in to iFirma yourself, in your own Cloud Browser: a Chrome we run for you in the EU, one per app. We never save your password (password saving is off), the profile is stored encrypted with AES-256-GCM, and your agents get iFirma only after you enable it. When iFirma signs you out, your agent gives you a link to sign in again. [Security](https://cotlet.dev/security.md)
- **Revoking access:** Press Disable for agents next to iFirma, sign out of iFirma in your Cloud Browser, or reset the browser. Every background request is listed in your Background activity. Actions that reach other people wait for your OK unless you switch that off per tool.
- **What we never do:** Store passwords, solve CAPTCHAs or bypass MFA.
- **iFirma's terms:** You use your own iFirma account and stay responsible for following iFirma's terms. Cotlet is independent and not affiliated with iFirma. [Terms](https://cotlet.dev/terms)
- **Contact:** Questions about the company, security or an app: [contact@cotlet.dev](mailto:contact@cotlet.dev)

## Frequently asked questions

**How do I get access?**

Sign up free, open iFirma in the console and press Request access. Then you create your API key and connect iFirma there.

**Do I need to be technical?**

No. You sign in to iFirma once in your Cloud Browser, a normal Chrome you open from the console, and paste one command into your agent, or one URL into n8n. Your agent can walk you through it. There is no server to install, update or fix.

**Is it safe to connect iFirma to Cotlet?**

Yes. You sign in to iFirma yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get iFirma once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

**Is a hosted server safer than a local one? My iFirma sign-in would leave my computer.**

On Cotlet you sign in inside your own Cloud Browser, which only you open, and its profile is stored encrypted with AES-256-GCM in the EU. Agents get only the apps you enable, and every background request is listed. A local server keeps your iFirma cookie in a plain file on your computer, readable by any program you run, and stops when your computer is off.

**Why does Cotlet send requests instead of clicking in my browser?**

To be fast, Cotlet doesn't click through iFirma's pages. It sends the same requests your browser would, from your browser's IP with its cookies, without opening a window. iFirma sees the same browser and IP you signed in with, and every request is listed in your Background activity.

**What if someone gets my Cotlet API key?**

The key holds no iFirma login or cookies, it only asks Cotlet to run a tool. It can call only the apps and tools you gave it, and a read-only key changes nothing. Anything that reaches other people, like posts, comments or messages, waits for your OK in the dashboard by default, so a leaked key cannot post or message as you. When you switch approval off for a scheduled job, give that job its own key limited to that one tool. Every call is in your activity log, and deleting the key ends access at once.

**Why a signed-in browser and not OAuth, like other integration platforms?**

iFirma offers no OAuth token you can simply grant for these tools: its official API leaves them out or needs a developer app, a plan or an approval first (see the official API section above). That is why Cotlet sets the limits itself: per key, per tool, with your approval before anything reaches other people. Cotlet is run by Take Group sp. z o.o., an EU company (VAT PL6342984273).

**Do I need to activate the iFirma API or pay for it?**

No. Cotlet works from your signed-in account, so no API keys. For comparison, the API is activated in your account: basic access is for under 1000 invoices a month, and subscribers can issue up to 1000 documents a month through it; more needs an individual quote.

**Which iFirma packages does KSeF purchase invoice download work on?**

iFirma lists downloading from KSeF for Księgowość internetowa and for the faktura plus and darmowa faktura packages. Booking the invoices is done under Wydatki.

**Can my agent post or send messages in iFirma without asking me?**

No. Every call to issue_invoice, send_invoice_to_ksef, send_invoice_email, record_payment, book_ksef_purchase_invoice, add_expense or send_payment_reminder waits for your OK by default. For scheduled automations you can switch confirmation off per tool in your dashboard, for example only for approvals. create_contractor, save_invoice_draft runs without asking, because it sends nothing to anyone and one call undoes it.

**Can I use the iFirma API in n8n?**

Yes. Add https://cotlet.dev/mcp/v1 with your API key in n8n's MCP Client node, or call its endpoints under https://cotlet.dev/api/v1/ifirma from the HTTP Request node.

---

Give your AI agents your signed-in browser.

**Product:** [Integrations](https://cotlet.dev/integrations.md) · [Use cases](https://cotlet.dev/use-cases.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Pricing](https://cotlet.dev/pricing.md) · [Security](https://cotlet.dev/security.md)

**Resources:** [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [GitHub](https://github.com/cotletdev/cotlet)

**Solutions:** [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md)

**Company:** [About](https://cotlet.dev/about.md) · [AI info: company facts](https://cotlet.dev/ai-info.md) · [Contact](https://cotlet.dev/contact.md)

**Legal:** [Terms of service](https://cotlet.dev/terms) · [Privacy policy](https://cotlet.dev/privacy) · [Refund policy](https://cotlet.dev/refunds) · [Acceptable use](https://cotlet.dev/acceptable-use) · [Cookie policy](https://cotlet.dev/cookies) · [DPA](https://cotlet.dev/dpa) · [Subprocessors](https://cotlet.dev/subprocessors)

**Elsewhere:** [Status page](https://status.cotlet.dev) · [Cotlet on GitHub](https://github.com/cotletdev) · [Cotlet on X](https://x.com/cotletdev) · [Cotlet on LinkedIn](https://www.linkedin.com/company/cotletdev) · [Cotlet on Product Hunt](https://www.producthunt.com/products/cotlet) · [Cotlet on Crunchbase](https://www.crunchbase.com/organization/cotlet) · [Cotlet on SaaSHub](https://www.saashub.com/cotlet)

Cotlet is an independent service. It is not affiliated with, endorsed by or sponsored by any of the products listed on this site. Product names are trademarks of their respective owners.

## For AI agents: sign your user up

Is your user asking you to sign them up for Cotlet? You can do it for them, no account or key needed.

1. Read the fields and their allowed values: GET https://cotlet.dev/api/v1/access-requests
2. Ask the user for each value: email, apps, what you will do with them. If they leave the password to you, generate a strong one and show it to them.
3. Show the user what you will send, then POST it as JSON to https://cotlet.dev/api/v1/access-requests.

One call creates the account and sends the access request; we email the user when access is granted.
