Public API · Open SDK

Build on PrivateCore

A REST API, two SDKs, one principle: the API runs on your Mac Mini, not on a cluster we control. The tokens are yours, the logs are yours, the latency is your LAN.

What the API enables

  • Connect your custom tools : an Airtable, a Slack, a legacy ERP, a homemade Grafana dashboard.
  • Automate the repetitive : generate the month's recurring invoices, trigger a reminder when a quote sits unsigned for 7 days, sync stock with a supplier feed.
  • Build internal apps : a mobile app for the dining team, a booking widget on your marketing site, a custom multi-site dashboard for management.
  • Audit and export : pull your full accounting as JSON, generate a FEC on demand, mirror your database to your own data warehouse.

Two official SDKs

TypeScript

@privatecore/sdk
TypeScript
import { PrivateCoreClient } from '@privatecore/sdk';

const pc = new PrivateCoreClient({
  baseUrl: 'https://mac-mini.your-tailnet.ts.net',
  token: process.env.PRIVATECORE_TOKEN,
});

// List this month's invoices
const invoices = await pc.invoices.list({
  from: '2026-04-01',
  to: '2026-04-30',
});

// Generate a compliant Factur-X invoice
const invoice = await pc.invoices.create({
  clientId: 'cli_0f3a',
  lines: [{ label: 'Consulting services', qty: 1, unitPrice: 1200, vat: 20 }],
  format: 'factur-x',
});

// Subscribe to real-time events
pc.events.on('invoice.paid', (event) => {
  console.log(`Invoice ${event.invoiceId} paid : €${event.amount}`);
});

Python

privatecore-sdk
Python
from privatecore import PrivateCoreClient

pc = PrivateCoreClient(
    base_url="https://mac-mini.your-tailnet.ts.net",
    token=os.environ["PRIVATECORE_TOKEN"],
)

# Export the current fiscal year FEC
fec = pc.accounting.export_fec(year=2026)
fec.save("fec_2026.txt")

# Create a CRM client
client = pc.crm.clients.create(
    name="Bistro des Remparts",
    email="[email protected]",
    segment="restaurant",
)

# Webhook: receive new OCR'd supplier invoices
@pc.webhook("supplier_invoice.ocr_completed")
def on_invoice_ocr(event):
    print(f"Invoice {event.supplier} : €{event.amount}")

Authentication

Tokens scoped per application, revocable, journalled locally.

  • Creation : one token per integration, under Settings → API → New token. You pick the scopes (read invoices, write CRM, etc.).
  • Never stored on our side : tokens are generated on your Mac Mini and exist nowhere else. Lose one, revoke it, generate a new one.
  • Full audit trail : every API call is timestamped in the local audit log (which token, from which IP, with what outcome). CSV export available.
  • Instant revocation : one click. The token becomes invalid immediately.

Rate limits

There is no SaaS quota. The practical limit is the power of your Mac Mini and the bandwidth of your local network.

Read operations (GET) are capped at 100 req/s per token so a runaway script doesn't slow down the UI for everyone else. Expensive operations (OCR, PDF generation, FEC export) are queued and processed one at a time to preserve interactive latency.

Documentation & status

  • Full docs : docs.privatecore.fr (reference, guides, recipes).
  • Changelog : every backend version exposes /api/changelog. Breaking changes follow a 6-month minimum deprecation cycle.
  • OpenAPI : OpenAPI 3.1 spec available in plaintext at /api/openapi.json. Works with Postman, Insomnia, third-party code generators.
  • Status : the API is included in the local Uptime Kuma supervision.

Ready to take back control?

A bespoke install, same-day reply, and your Mac Mini delivered in 24h.