Help centerIntegrations
Integrating with your app
Tenanci detects your app's platform (Bubble, FlutterFlow, WeWeb, Softr, Lovable, Bolt…) and shows ready-made recipes to know which customer is being served and to let customers connect their own domain.
One app, many customers, each on their own domain. To make that work end to end, your app needs two things: to know which customer each visit belongs to, and a "Connect domain" button so customers can put their domain live on their own. The project's Integration tab gives you both recipes, ready for the platform your app was built on.
Detected platform
The first time you open the tab, Tenanci reads your project's origin home page and recognizes the platform from the
address (for example *.bubbleapps.io or *.flutterflow.app) or from the scripts in the HTML.
- Open the project and click the Integration tab.
- Wait for "Detecting the platform…". When it works, you'll see the Detected from the origin badge (hover it to see why, such as "Bubble scripts").
- Wrong guess, or the app moved to another platform? Pick the right one under App platform, or click one of the shortcuts (Bubble, FlutterFlow, WeWeb, Softr, Lovable, Bolt, Other).
Recognized platforms: Bubble, FlutterFlow, Flutter Web, WeWeb, Softr, Lovable, Bolt, Webflow, Framer and WordPress. Anything else (React, Vue, Next…) falls under Other, with the generic guide.
What the guide covers
Each guide has a Good to know box (what works out of the box on that platform) and two steps, with your project id and API address already filled in and a copy button on every snippet:
- Find out who the customer is: how the app reads the customer from the domain the visitor opened.
- "Connect domain" button (customer portal): the call that creates a portal link, in the format your platform imports (Bubble API Connector, FlutterFlow API Calls, Xano, n8n, Make, Supabase).
Lovable, Bolt and generic apps also get a Ready-made AI prompt to paste into the builder's chat.
Step 1: find out who the customer is
First, tell Tenanci which customer each domain belongs to: under domain → Settings → Customer for this domain, fill in the Customer id in your app and the Customer data (name, plan, colors…). From then on, your app gets the customer in two ways:
| Where | How it arrives | Best for |
|---|---|---|
| Backend (the project's origin) | signed X-Tenanci-Tenant and X-Tenanci-Tenant-Data headers |
apps with their own server |
| Browser | window.TENANCI = { domain, tenant: { id, data } } |
Bubble, FlutterFlow, WeWeb, Softr, Lovable, Bolt |
For the browser, turn on Available in the browser (window.TENANCI) on each domain's customer. Domains connected through the portal follow the Send customer data to the browser (window.TENANCI) on domains connected through the portal option, on the Customer portal tab.
Header and signature details are in Customer context.
Step 2: the "Connect domain" button
The button in your app calls your backend, which creates a customer portal link with
POST /projects/:id/portal/sessions and sends the customer to the url
it gets back. In the portal, the customer sees the DNS record and follows verification and HTTPS, without access to
your dashboard.
curl -X POST "https://api.tenanci.com/v2/projects/prj_8f3k2m/portal/sessions" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"tenantId":"barbershop-123","tenantData":{"name":"Joe'\''s Barbershop"},"returnUrl":"https://app.bookeasy.com/account"}'
# → 201 { "id": "pss_…", "url": "…/portal#pss_….…", "expiresAt": "…" }import { Tenanci } from "@tenanci/sdk";
const tenanci = new Tenanci({ apiKey: process.env.TENANCI_API_KEY!, baseUrl: "https://api.tenanci.com/v2" });
const { url } = await tenanci.portal.createSession("prj_8f3k2m", {
tenantId: customer.id,
tenantData: { name: customer.name },
returnUrl: "https://app.bookeasy.com/account",
});
// redirect the customer to urlThe key stays on the server
The step 2 call uses a key with the domains:write scope (create one under API keys). It never
goes into the browser or a mobile app. Each platform has its own vault:
| Platform | Where the key lives |
|---|---|
| Bubble | API Connector, "Private key in header" authentication |
| FlutterFlow | API Call with "Make Private" |
| Lovable, Bolt, WeWeb | Supabase secret TENANCI_API_KEY (or a Xano environment variable) |
| Softr | n8n or Make credential |
Through the API
To automate the choice (for example, when creating projects in bulk):
POST /projects/:id/platform/detectreads the origin again and returns{ platform, why };PUT /projects/:id/platformsaves the platform you pick (bubble,flutterflow,flutter,weweb,softr,lovable,bolt,webflow,framer,wordpressorother).
curl -X POST "https://api.tenanci.com/v2/projects/prj_8f3k2m/platform/detect" -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"
# → { "platform": "bubble", "why": "endereço *.bubbleapps.io" }Platform guides
- Bubble: API Connector, "This url" and Toolbox;
- FlutterFlow, WeWeb and Softr: Dart Custom Action, JavaScript formula, custom code;
- Lovable, Bolt and other AI builders: ready-made prompt and Supabase Edge Function;
- Supabase, Xano, n8n and Make: where to create the portal link and automate domains.

