Overview

The Inklura Platform API exposes every business domain — products, orders, clients, invoices, campaigns, and ~350 more routers — over one canonical surface.

  • Canonical: tRPC. Every procedure is reachable at /api/trpc/<router>.<procedure>. There are roughly 350 top-level routers and ~6,567 procedures.
  • Partial: REST. A /api/v1/<router>/<procedure> bridge exists but only a handful of procedures are wired today. Treat it as experimental.

New integrations should target tRPC.

Base URL

https://manage.inklura.fr

All examples on this page use that host. See Environments for other targets.

Note

An internal "lean" copy of the same router runs on the loopback interface (127.0.0.1:4000) to serve the console; it is not public. The dev server listens on port 3060.

Request & response format

tRPC is mounted at /api/trpc and accepts both GET and POST. The wire transformer is superjson, so inputs are wrapped as {"json": <value>} and the payload you want is nested at result.data.json in the response.

Procedure kind HTTP verb Input
Query GET ?input={"json":<value>} (URL-encoded)
Mutation POST request body {"json":<value>}

Query (GET)

A query passes its input in the URL. Here, auth.getSession takes no input, so the ?input= is omitted:

curl "https://manage.inklura.fr/api/trpc/auth.getSession" \
  -H "Authorization: Bearer $INKLURA_TOKEN"

A query that does take input encodes a superjson envelope in ?input=:

curl -G "https://manage.inklura.fr/api/trpc/products.get" \
  -H "Authorization: Bearer $INKLURA_TOKEN" \
  --data-urlencode 'input={"json":{"id":"<product-id>"}}'

The response nests the result under result.data.json:

{
  "result": {
    "data": {
      "json": { "id": "<product-id>", "name": "…" }
    }
  }
}

Mutation (POST)

A mutation sends its input as the JSON body, again wrapped in {"json":<value>}:

curl -X POST "https://manage.inklura.fr/api/trpc/clients.create" \
  -H "Authorization: Bearer $INKLURA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json":{"name":"Acme SARL","email":"contact@acme.example"}}'

The response has the same result.data.json shape. See tRPC Procedures for a typed @trpc/client example and the full calling conventions.

Batching

The endpoint speaks the standard tRPC batch protocol, so a client configured with httpBatchLink can coalesce several calls into one HTTP request. Method override is enabled on the mount (allowMethodOverride=true). See tRPC Procedures.

Tenancy

Inklura is multi-tenant, and your tenant travels in your credential. Every call resolves to a tenant (and usually a site) scope:

  • Bearer JWT (recommended). The signed token encodes your tenantId and siteId. When you authenticate with a Bearer token, the server takes the tenant/site directly from the token and looks no further. This is what makes manage.inklura.fr a single, truly multi-tenant endpoint — you pick the tenant by choosing which token you send, and the same URL serves every tenant. See Sessions & Tokens.
  • Session cookie / browser. A request authenticated only by a session cookie derives its scope from, in order: explicit X-Tenant-Id / X-Site-Id headers, then the selected_tenant / selected_site / selected_host cookies, then the request Host.
X-Tenant-Id: <tenant uuid>
X-Site-Id:   <site uuid>
Note

Do not rely on X-Tenant-Id / X-Site-Id to pick a tenant on the shared manage.inklura.fr host — client-supplied tenancy headers are stripped there as an anti-spoofing measure. Programmatic callers should carry the tenant in their Bearer token, which is authoritative on every host; the header path is for a tenant calling its own domain, where the Host already identifies the tenant. The OpenAPI portals still advertise the two headers alongside bearerAuth for that case.

Note

Tenancy is enforced in application code, not by database row-level security. Every tenant-owned row carries a tenantId — see the Data Model.

Where to next

Page What it covers
Sessions & Tokens Token resolution order, tenant/site scope, dev bypass
tRPC Procedures Procedure kinds, calling conventions, router catalog
REST Endpoints The partial /api/v1 bridge and OpenAPI portals
Data Model ORM, multi-tenancy, and the key models
Errors & Rate Limits Error envelope, codes, and feature-scoped limits
Pagination & Filtering The page/pageSize convention