Your invoicing, by API. REST, Verifactu, OpenAPI.

FacturaHub's API is a REST API that lets you run your entire invoicing from your code, without going through the dashboard: you create invoices, clients, expenses and declarations, emit Verifactu and query metrics, all with JSON over HTTPS. It's the same backend the web app, the WhatsApp agent and the MCP server use, so any data you create via API shows up instantly across all three channels.

Authentication

Authentication is dual and you pick based on your case:

Resources

The endpoints cover the whole business. Each resource supports the usual REST operations (GET to list/read, POST to create, PATCH/PUT to update, DELETE to remove):

Example: create an invoice

curl -X POST https://api.facturahub.com/api/invoices \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "client": { "name": "Acme SL", "taxId": "B12345678", "country": "ES" },
    "items": [{ "description": "Consulting", "quantity": 1, "unitPrice": 1000 }],
    "taxRate": 21,
    "retentionRate": 15,
    "issueDate": "2026-06-18"
  }'

Verifactu and Modelo 303 via API

To emit an e-invoice in Spain, you first create the invoice and then emit it with POST /api/einvoice (or the legacy Verifactu endpoint): FacturaHub signs the record, sends it to the AEAT via Verifactu and returns the fiscal id, QR and status. For quarterly IVA, POST /api/tax-declarations/generate with {country:"ES", year, period} returns all Modelo 303 boxes calculated from your real invoices and expenses — ready for you or your accountant to file.

Documentation and SDKs

The whole API is documented and browsable:

Pricing

The plan is free and everything is unlimited: invoices, clients, expenses, API calls, Verifactu, Modelo 303 and CSV and PDF export. The only thing metered is AI: 25 free AI actions per month (for example a receipt OCR), and if you need more you buy a one-off token pack from €4.99 that never expires. There are no Starter/Growth/Pro plans or 7-day trial, and creating invoices or clients via the plain API doesn't consume AI.

Coming soon

Honest about what isn't ready yet (we don't announce it as available):

In the meantime, you work against your real account and can use draft invoices to test without emitting anything fiscal.

REST API over JSON

Create, read, update and delete resources with standard HTTP. Same backend as the web, WhatsApp and MCP: what you create via API appears instantly across all three.

Dual auth: x-api-key or JWT

Use your API key in the x-api-key header for server-to-server integrations, or a JWT token in Authorization: Bearer if you already have a user session.

Every business resource

invoices, clients, expenses, catalog, tasks, teams, vendors, supplier-invoices, tax-declarations, e-invoice, cash-register and context. Full invoicing by API.

Verifactu by API

Create the invoice and emit it with POST /api/einvoice. FacturaHub signs the record, sends it to the AEAT via Verifactu and returns fiscal id, QR and status.

Programmatic Modelo 303

POST /api/tax-declarations/generate with {country:"ES", year, period} returns all 303 boxes calculated from your real data.

OpenAPI 3.1 + Swagger UI

Public spec at facturahub.com/openapi.json (importable into Postman/Insomnia) and a browsable Swagger UI at facturahub.com/api-docs to test from the browser.

Examples on GitHub

Public repository with examples in cURL, JavaScript, Python and PHP: github.com/Santy1422/facturahub-api.

Coming soon

Public testing sandbox, outbound webhooks (invoice.paid and similar) and a versioned base path /v1. Honestly: not yet, they're on the roadmap.

Frequently asked questions

How do I authenticate with the API?

Two ways: with your API key in the x-api-key header (ideal for scripts and servers), or with a JWT token in Authorization: Bearer (if you already have a user session). You generate your key from your account settings.

Where is the API documentation?

The OpenAPI 3.1 spec is at facturahub.com/openapi.json and the browsable Swagger UI at facturahub.com/api-docs. There are cURL, JavaScript, Python and PHP examples in the GitHub repo: github.com/Santy1422/facturahub-api.

What resources can I manage via API?

Practically the whole business: invoices, clients, expenses, product catalog, tasks, teams, vendors and received invoices, tax declarations (Modelo 303), e-invoicing (Verifactu), cash register and business context.

Can I emit Verifactu via API?

Yes. You create the invoice and emit it with POST /api/einvoice. FacturaHub signs the record, sends it to the AEAT via Verifactu and returns the fiscal id, QR and status of the e-invoice.

Is there a test sandbox and webhooks?

Not yet, and we prefer to be honest: the public sandbox, outbound webhooks (invoice.paid and similar) and a versioned base path /v1 are on the roadmap as coming soon. In the meantime you can test with draft invoices, which don't emit anything fiscal.

How much does using the API cost?

Nothing: the plan is free and API calls are unlimited. Only AI is metered — 25 free AI actions per month (like a receipt OCR) and one-off token packs from €4.99 if you need more. Creating invoices or clients via the plain API doesn't consume AI.

Is it the same account as the dashboard?

Yes. The API uses the same backend as the web, the WhatsApp agent and the MCP server. What you create via API appears instantly in the dashboard and vice versa: a single data source for all channels.