Quickstart
This walks you through your first authenticated call to the Inklura Platform API. The
API is tRPC: you call a procedure by its router.procedure name and pass a
JSON input.
1. Get a session
Browser sessions are minted by signing in to manage.inklura.fr.
For programmatic access you send that session as a Bearer JWT (signed with the
platform's AUTH_SECRET, HS256) in an Authorization header. See
Authentication for every way to obtain one; the fastest
for testing is to copy the __Secure-authjs.session-token cookie value from a logged-in
browser session.
export INKLURA_TOKEN="<your session JWT>"
export INKLURA_BASE="https://manage.inklura.fr"
2. Verify who you are
auth.getSession returns the identity and tenant/site scope of your token — the ideal
first call to confirm auth works.
curl -s "$INKLURA_BASE/api/trpc/auth.getSession" \
-H "Authorization: Bearer $INKLURA_TOKEN" | jq
A tRPC query with no input is a plain GET. The response is a superjson envelope:
{ "result": { "data": { "json": { "user": { "id": "…", "email": "…" }, "tenantId": "…" } } } }
The value you care about is nested at result.data.json.
3. Read some data
Most reads take an input object. For a query, pass it URL-encoded as
?input={"json":<value>}:
curl -s -G "$INKLURA_BASE/api/trpc/products.list" \
-H "Authorization: Bearer $INKLURA_TOKEN" \
--data-urlencode 'input={"json":{"page":1,"pageSize":20}}' | jq '.result.data.json'
4. Write some data
Mutations are POST, with the input as the JSON body (wrapped in {"json": …}):
curl -s -X POST "$INKLURA_BASE/api/trpc/clients.create" \
-H "Authorization: Bearer $INKLURA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"json":{"name":"Acme SARL","email":"contact@acme.fr"}}' | jq '.result.data.json'
Prefer a typed client? Point the official tRPC client (@trpc/client with httpBatchLink
and the superjson transformer) at https://manage.inklura.fr/api/trpc and set the
Authorization header. See tRPC Procedures for a full example.
Next steps
- Authentication — every way to get a token, plus OIDC and magic links.
- Platform API → Overview — request/response format, tenancy headers, batching.
- Errors & Rate Limits — the error envelope and status mapping.
- Build Your First App — go beyond calling the API and ship an app on the platform.