Help centerDevelopers
API keys
Create keys, pick scopes, lock a key to one project, rotate without breaking the integration, and revoke.
An API key is what lets your backend, an automation (n8n, Make, Bubble) or an AI agent talk to Tenanci on behalf of your organization. Each key has a name, the scopes you choose and, ideally, is locked to a single project. That way, if one leaks, the damage is small and it's easy to replace.
Create a key
- In the menu, open API keys.
- Click New key.
- Under Name, say where the key will be used (e.g. "Bubble integration (production)"). It helps a lot when you later rotate or revoke it.
- Under Restrict to a project, pick the project, or leave All projects.
- Under Scopes, tick only what the integration needs (see below).
- Click Create key.
- In the Copy your key now window, copy the key and store it somewhere safe. Then click I've copied it, close.
Keys look like tnc_live_<prefix>_<secret>. The prefix is what the list shows, so you can tell keys apart. Send the
key with every request, in the Authorization: Bearer or X-API-Key header
(details).
Scopes
| In the dashboard | Scope | Allows |
|---|---|---|
| Read projects | projects:read |
list and read projects |
| Manage projects | projects:write |
create, change and delete projects and project rules |
| Read domains | domains:read |
list and read domains, DNS, events and each domain's settings |
| Manage domains | domains:write |
add, change and remove domains and each domain's settings |
All four are ticked by default; untick what you don't use. At least one is required. If a scope is missing, the API
answers 403 forbidden and says which one was needed.
Restrict to a project
A key restricted to a project only sees that project and its domains; asking for anything else returns 403.
A key with All projects works across the whole organization.
Track usage
For each key the list shows Name (and when it was created), Key (the prefix), Project, Scopes and Last used. A key that was never used shows "never"; last use is updated at most once a minute.
Every create, rotate and revoke is recorded in the organization activity, and actions taken with the key show up there as "API key" followed by its id.
Rotate without downtime
Rotating creates a new key with the same name, project and scopes, while the current one keeps working for a while so you can swap it calmly.
- On the key's row, click Rotate.
- Under Keep the current key working for, choose Stop now, 1 hour, 24 hours (default) or 7 days.
- Confirm with Rotate and copy the new key from the window that opens.
- Replace the key in your system (environment variable, secrets manager) and deploy.
During the grace period the old key shows a "valid until" badge with the date. When that passes, it stops working on its own and disappears from the list.
Revoke
- On the key's row, click Revoke.
- Confirm with Revoke.
The key stops working immediately: any request using it gets 401 unauthorized. This can't be undone; if you
need access again, create a new key.
Check a key through the API
GET /me tells you who is calling: the organization, the kind of access and the subscription. It's a
good smoke test right after you set up a key.
curl https://api.tenanci.com/v2/me -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"
# → { "principal": { "kind": "api_key", "orgId": "org_..." }, "organization": { ... }, "active": true, ... }import { Tenanci } from "@tenanci/sdk";
const tenanci = new Tenanci({ apiKey: process.env.TENANCI_API_KEY!, baseUrl: "https://api.tenanci.com/v2" });
const me = await tenanci.request<{ principal: { kind: string; orgId: string } }>("GET", "/me");
console.log(me.principal.orgId);What a key can't do
For safety, some things are dashboard-only, with a person signed in:

