Tenants
Tenants represent isolated customer workspaces within your application. Each tenant has its own set of users, configuration, and data — making them the foundational building block for multi-tenant SaaS applications built on The Bridge.
List All Tenants
Section titled “List All Tenants”Retrieve a list of all tenants registered under your application.
HTTP Request
Section titled “HTTP Request”GET https://api.thebridge.dev/account/tenant
Response HTTP 200
Section titled “Response HTTP 200”HTTP 200 — Array of tenant objects.
Request example
curl --request GET 'https://api.thebridge.dev/account/tenant' \
--header 'x-api-key: YOUR_APP_API_KEY'Response example:
[ { "id": "624c14cc0c01e70033356285", "plan": "TEAM", "trial": false, "paymentStatus": { "shouldSelectPlan": false, "shouldSetupPayments": false, "provider": "STRIPE", "paymentsEnabled": true }, "mfa": false, "locale": "en", "name": "Nebulr AB", "logo": "", "metadata": {}, "onboarded": true, "createdAt": "2022-04-05T10:07:08.235Z" }]GET Try it out
https://api.thebridge.dev/account/tenantGet Tenant by ID
Section titled “Get Tenant by ID”Retrieve a single tenant by its unique identifier.
HTTP Request
Section titled “HTTP Request”GET https://api.thebridge.dev/account/tenant/byId/:TENANT_ID
Response HTTP 200
Section titled “Response HTTP 200”HTTP 200 — Tenant object.
Request example
curl --request GET 'https://api.thebridge.dev/account/tenant/byId/TENANT_ID' \
--header 'x-api-key: YOUR_APP_API_KEY'Response example:
{ "id": "624c14cc0c01e70033356285", "plan": "TEAM", "trial": false, "paymentStatus": { "shouldSelectPlan": false, "shouldSetupPayments": false, "provider": "STRIPE", "paymentsEnabled": true }, "mfa": false, "locale": "en", "name": "Nebulr AB", "logo": "", "metadata": {}, "onboarded": true, "createdAt": "2022-04-05T10:07:08.235Z"}GET Try it out
https://api.thebridge.dev/account/tenant/byId/:TENANT_IDCreate a Tenant
Section titled “Create a Tenant”Create a new tenant workspace. An owner must be specified to act as the initial administrator of the tenant.
HTTP Request
Section titled “HTTP Request”POST https://api.thebridge.dev/account/tenant
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | object | Required | The initial owner of the tenant. Must include email (string, required), firstName (string, required), and lastName (string, required). |
name | string | Optional | Display name of the tenant |
plan | string | Optional | The subscription plan key to assign |
locale | string | Optional | Locale code, e.g. en, sv |
logo | string | Optional | URL to the tenant logo |
onboarded | boolean | Optional | Whether the tenant has completed onboarding |
metadata | Record<string, any> | Optional | Arbitrary key-value metadata to store on the tenant |
Response HTTP 200
Section titled “Response HTTP 200”HTTP 200 — Returns the created tenant object.
Request example
curl --request POST 'https://api.thebridge.dev/account/tenant' \
--header 'x-api-key: YOUR_APP_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"owner": {
"email": "jane@example.com",
"firstName": "Jane",
"lastName": "Doe"
},
"name": "Nebulr AB",
"plan": "TEAM",
"locale": "en"
}'Response example:
{ "id": "624c14cc0c01e70033356285", "plan": "TEAM", "trial": false, "paymentStatus": { "shouldSelectPlan": false, "shouldSetupPayments": false, "provider": "STRIPE", "paymentsEnabled": true }, "mfa": false, "locale": "en", "name": "Nebulr AB", "logo": "", "metadata": {}, "onboarded": true, "createdAt": "2022-04-05T10:07:08.235Z"}POST Try it out
https://api.thebridge.dev/account/tenantUpdate a Tenant
Section titled “Update a Tenant”Update properties of an existing tenant.
HTTP Request
Section titled “HTTP Request”PUT https://api.thebridge.dev/account/tenant/:TENANT_ID
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Optional | Display name of the tenant |
locale | string | Optional | Locale code, e.g. en, sv |
logo | string | Optional | URL to the tenant logo |
mfa | boolean | Optional | Enable or disable multi-factor authentication for the tenant |
onboarded | boolean | Optional | Whether the tenant has completed onboarding |
federationConnection | string | Optional | Federation connection identifier for SSO |
metadata | Record<string, any> | Optional | Arbitrary key-value metadata to store on the tenant |
Response HTTP 200
Section titled “Response HTTP 200”HTTP 200 — Returns the updated tenant object.
Request example
curl --request PUT 'https://api.thebridge.dev/account/tenant/TENANT_ID' \
--header 'x-api-key: YOUR_APP_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Nebulr AB",
"locale": "sv",
"onboarded": true
}'Response example:
{ "id": "624c14cc0c01e70033356285", "plan": "TEAM", "trial": false, "paymentStatus": { "shouldSelectPlan": false, "shouldSetupPayments": false, "provider": "STRIPE", "paymentsEnabled": true }, "mfa": false, "locale": "sv", "name": "Nebulr AB", "logo": "", "metadata": {}, "onboarded": true, "createdAt": "2022-04-05T10:07:08.235Z"}PUT Try it out
https://api.thebridge.dev/account/tenant/:TENANT_ID