This page documents all data models returned by The Bridge API.
{
"id": "624c14cc0c01e70033356282",
"name": "My app",
"domain": "MY_APP",
"apiUrl": "http://localhost:3000",
"uiUrl": "http://localhost:8100",
"emailSenderName": "My App",
"emailSenderEmail": "noreply@myapp.com",
"webhookUrl": "http://api.example.com/webhook",
"stripeEnabled": false,
"paymentsAutoRedirect": true,
"passkeysEnabled": true,
"magicLinkEnabled": true,
"mfaEnabled": true,
"azureMarketplaceEnabled": false,
"googleSsoEnabled": false,
"azureAdSsoEnabled": true,
"linkedinSsoEnabled": true,
"githubSsoEnabled": true,
"facebookSsoEnabled": true,
"onboardingFlow": "B2B",
"tenantSelfSignup": true,
"cloudViews": true,
"redirectUris": ["http://localhost:8080/auth/oauth-callback"],
"defaultCallbackUri": "http://localhost:8080/auth/oauth-callback",
"logo": "https://public.nblocks.dev/assets/logos/nblocks-logo-black.svg",
"websiteUrl": "http://localhost",
"privacyPolicyUrl": "",
"termsOfServiceUrl": "",
"accessTokenTTL": 3600,
"refreshTokenTTL": 604800
}
| Property | Type | Description |
|---|
id | string | Unique ID (read only) |
name | string | Name of the app |
domain | string | Unique domain name (read only) |
apiUrl | string | URL to your API |
uiUrl | string | URL to your frontend app |
webhookUrl | string | Webhook events URL |
logo | string | URL to your logo |
websiteUrl | string | URL to your website |
privacyPolicyUrl | string | Privacy policy URL |
termsOfServiceUrl | string | Terms of service URL |
emailSenderName | string | Email sender name |
emailSenderEmail | string | Email sender address |
stripeEnabled | boolean | Stripe payments enabled |
paymentsAutoRedirect | boolean | Auto-redirect to plan selection |
passkeysEnabled | boolean | Passkey login enabled |
magicLinkEnabled | boolean | Magic-Link login enabled |
mfaEnabled | boolean | Multi-factor auth enabled |
googleSsoEnabled | boolean | Google SSO enabled |
azureAdSsoEnabled | boolean | Azure AD SSO enabled |
linkedinSsoEnabled | boolean | LinkedIn SSO enabled |
githubSsoEnabled | boolean | GitHub SSO enabled |
facebookSsoEnabled | boolean | Facebook SSO enabled |
onboardingFlow | OnboardingFlow | Onboarding configuration |
cloudViews | boolean | Use Bridge-provided UI |
tenantSelfSignup | boolean | Allow self-service signup |
redirectUris | string[] | Allowed redirect URIs |
defaultCallbackUri | string | Default callback URI |
accessTokenTTL | number | Access token lifetime (seconds) |
refreshTokenTTL | number | Refresh token lifetime (seconds) |
{
"stripeCredentialsAdded": true,
"azureMarketplaceCredentialsAdded": true,
"azureAdSsoCredentialsAdded": false,
"googleSsoCredentialsAdded": true
}
| Property | Type | Description |
|---|
stripeCredentialsAdded | boolean | Stripe keys exist |
azureMarketplaceCredentialsAdded | boolean | Azure Marketplace credentials exist |
azureAdSsoCredentialsAdded | boolean | Azure AD SSO credentials exist |
googleSsoCredentialsAdded | boolean | Google SSO credentials exist |
{
"id": "624c14cc0c01e70033356285",
"plan": "TEAM",
"trial": false,
"paymentStatus": {
"shouldSelectPlan": false,
"shouldSetupPayments": false,
"provider": "STRIPE",
"paymentsEnabled": true
},
"mfa": false,
"locale": "en",
"name": "Nebulr AB",
"logo": "https://example.com/logo.png",
"metadata": {},
"onboarded": true,
"signupBy": {
"email": "john@example.com",
"firstName": "John",
"lastName": "Doe"
},
"createdAt": "2022-04-05T10:07:08.235Z"
}
| Property | Type | Description |
|---|
id | string | Unique ID (read only) |
plan | string | Subscribed plan key |
trial | boolean | Currently trialing |
locale | string | Default locale (ISO 639-1) |
name | string | Tenant name |
logo | string | Logo URI |
mfa | boolean | MFA/2FA required |
paymentStatus | PaymentStatus | Current payment status |
metadata | Record | Custom key-value data |
onboarded | boolean | Onboarding completed |
federationConnection | string | Federation connection ID |
signupBy | object | Original owner info |
createdAt | string | Created timestamp (read only) |
{
"shouldSelectPlan": false,
"shouldSetupPayments": false,
"provider": "STRIPE",
"paymentsEnabled": true
}
| Property | Type | Description |
|---|
shouldSelectPlan | boolean | Tenant needs to select a plan |
shouldSetupPayments | boolean | Tenant needs to setup payments |
paymentsEnabled | boolean | Payment method has been set up |
provider | string | Payment provider used |
{
"status": {
"shouldSelectPlan": false,
"shouldSetupPayments": true,
"paymentsEnabled": true,
"provider": "STRIPE"
},
"details": {
"plan": {
"id": "6516f55b900518015dc98f3e",
"key": "premium",
"name": "Premium",
"trial": true,
"trialDays": 15,
"prices": [
{ "amount": 100, "currency": "EUR", "recurrenceInterval": "month" }
]
},
"price": { "amount": 100, "currency": "EUR", "recurrenceInterval": "month" },
"trial": false,
"trialDaysLeft": 0
}
}
| Property | Type | Description |
|---|
status | PaymentStatus | Current payment status |
details.plan | Plan | Subscribed plan |
details.price | Price | Active price |
details.trial | boolean | Currently trialing |
details.trialDaysLeft | number | Days until trial ends |
{
"id": "63cad6ac48dcba47e9322853",
"role": "OWNER",
"email": "john.doe@example.com",
"username": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"onboarded": true,
"consentsToPrivacyPolicy": false,
"enabled": true,
"teams": ["cool_gang"],
"lastSeen": "2023-01-20T18:00:12.489Z",
"createdAt": "2023-01-20T18:00:12.489Z",
"tenant": {
"id": "624c14cc0c01e70033356285",
"plan": "TEAM",
"name": "Nebulr AB"
}
}
| Property | Type | Description |
|---|
id | string | Unique ID (read only) |
role | string | User role key |
email | string | Email address |
username | string | Username |
firstName | string | First name |
lastName | string | Last name |
fullName | string | Full name (concatenated) |
onboarded | boolean | Onboarding completed |
consentsToPrivacyPolicy | boolean | Privacy policy consent |
enabled | boolean | Can login |
teams | string[] | Group identifiers |
lastSeen | string | Last activity (read only) |
createdAt | string | Created timestamp (read only) |
tenant | Tenant | The tenant |
| Property | Type | Description |
|---|
token_type | string | Token type |
expires_in | number | Seconds before access_token expires |
access_token | string | JWT access token |
refresh_token | string | JWT refresh token |
id_token | string | JWT OpenID Connect profile |
user_profile | object | Decoded id_token (shorthand endpoint only) |
Decoded JWT payload:
{
"sub": "63d25a9e0796d40008680f9a",
"scope": "TENANT_WRITE TENANT_READ USER_WRITE USER_READ AUTHENTICATED",
"role": "OWNER",
"aid": "624c14cc0c01e70033356282",
"tid": "63d25a9e0796d40008680f96",
"plan": "Basic"
}
| Property | Type | Description |
|---|
sub | string | User ID |
scope | string | User privileges |
role | string | User role |
aid | string | App ID |
tid | string | Tenant ID |
plan | string | Tenant plan key |
Decoded JWT payload:
{
"sub": "63d25a9e0796d40008680f9a",
"name": "John Doe",
"family_name": "Doe",
"given_name": "John",
"preferred_username": "john@example.com",
"locale": "en",
"email": "john@example.com",
"email_verified": true,
"onboarded": true,
"tenant_id": "63d25a9e0796d40008680f96",
"tenant_name": "Johns Family",
"tenant_locale": "en",
"tenant_logo": ""
}
| Property | Type | Description |
|---|
sub | string | User ID |
name | string | Full name |
family_name | string | Last name |
given_name | string | First name |
preferred_username | string | Username |
locale | string | Preferred locale |
email | string | Email address |
email_verified | boolean | Email verified |
onboarded | boolean | Onboarding completed |
tenant_id | string | Tenant ID |
tenant_name | string | Tenant name |
tenant_locale | string | Tenant locale |
tenant_logo | string | Tenant logo URI |
{
"id": "6516a01891eca485bfc230ba",
"name": "Owner",
"key": "OWNER",
"description": "The owner of the app",
"privileges": [
{
"id": "6516a0ee38183223122704e3",
"key": "AUTHENTICATED",
"description": "Privilege for all authenticated users"
}
],
"isDefault": false
}
| Property | Type | Description |
|---|
id | string | Unique ID (read only) |
name | string | Presentable label |
key | string | Unique key for reference |
description | string | Description text |
privileges | Privilege[] | Linked privileges |
isDefault | boolean | Applied to new users by default |
{
"id": "6516a0ee38183223122704e3",
"key": "AUTHENTICATED",
"description": "Privilege for all authenticated users"
}
| Property | Type | Description |
|---|
id | string | Unique ID (read only) |
key | string | Key used for access evaluation |
description | string | Description text |
{
"id": "6571edf9dc018000227ac449",
"type": "saml",
"name": "Foobar SAML",
"clientId": "client_1234",
"loginUrl": "https://idp.example.com/api/saml/sso",
"certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
"requestMethod": "POST",
"signedRequest": true,
"signedRequestAlgorithm": "sha256",
"createdAt": "2023-12-07T16:08:25.061Z"
}
| Property | Type | Description |
|---|
id | string | Unique ID (read only) |
type | string | Connection type (saml) |
name | string | Connection name |
clientId | string | IdP application identifier |
loginUrl | string | SAML request URL |
certificate | string | IdP public key certificate |
requestMethod | string | GET or POST |
signedRequest | boolean | Signed SAML requests |
signedRequestAlgorithm | string | sha256 or sha512 |
privateKey | string | Request signing private key |
createdAt | string | Created timestamp (read only) |
{
"id": "650c548c29b15b62e681f28a",
"key": "premium",
"name": "Premium",
"trial": true,
"trialDays": 14,
"prices": [
{ "amount": 50, "currency": "EUR", "recurrenceInterval": "month" }
],
"createdAt": "2023-09-21T14:34:52.248Z"
}
| Property | Type | Description |
|---|
id | string | Unique ID (read only) |
key | string | Unique plan key |
name | string | Plan name (visible to customers) |
trial | boolean | New subscribers start with trial |
trialDays | number | Days before trial expires |
prices | Price[] | Available prices |
createdAt | string | Created timestamp (read only) |
{
"amount": 50,
"currency": "EUR",
"recurrenceInterval": "month"
}
| Property | Type | Description |
|---|
amount | number | Recurring charge amount |
currency | string | ISO 4217 currency code |
recurrenceInterval | string | day, week, month, or year |
{
"id": "650c55b8ac7f396d770a98b1",
"countryCode": "DE",
"name": "VAT",
"percentage": 19,
"createdAt": "2023-09-21T14:39:52.816Z"
}
| Property | Type | Description |
|---|
id | string | Unique ID (read only) |
countryCode | string | Two-letter ISO country code |
name | string | Tax name (visible to customers) |
percentage | number | Tax percentage (0-100) |
createdAt | string | Created timestamp (read only) |
The request body accepted by the feature-flag evaluation endpoints. It is the REST mapping of the FF 2.0 { identity, attributes } model: user.id / tenant.id supply the bucketing identity, and the remaining fields become attributes your rules target. Fields in bold are auto-resolved when providing an access token.
{
"user": {
"id": "63d2ab029e23db0afb07a5a7",
"role": "ADMIN",
"name": "John Doe",
"email": "john@doe.com",
"key": "custom-user-trait"
},
"tenant": {
"id": "66238feb99227400774266f5",
"plan": "PREMIUM",
"name": "My Workspace",
"key": "custom-tenant-trait"
},
"device": {
"key": "iphone"
},
"custom": {
"property1": "value1",
"property2": "value2"
}
}
| Property | Type | Description |
|---|
user.id | string | User ID |
user.email | string | User email |
user.role | string | User role |
user.name | string | User name |
user.key | string | Custom value |
tenant.id | string | Tenant ID |
tenant.plan | string | Tenant plan key |
tenant.name | string | Tenant name |
tenant.key | string | Custom value |
device.key | string | Device identifier |
custom.* | string | Custom key-value pairs |
Returned by the evaluation endpoints. In bulk evaluation, this is the evaluation object on each array entry.
{
"enabled": true,
"value": "dark",
"variantIndex": 1
}
| Property | Type | Description |
|---|
value | boolean | string | number | object | The typed flag result. Type is inferred from the flag’s configured value type |
enabled | boolean | Legacy boolean convenience. For a boolean flag it is the value itself; for every other value type it reports whether a branch matched, not whether the flag is on. See Feature Flags |
variantIndex | number | Matched rule branch: -1 = the otherwise value, >= 0 = the zero-based index of the matched branch (a flag in plain on state reports 0) |
FF 2.0 flags use a three-state model with explicit, multi-type return values. There is no public REST API for this shape: flags are configured in the Bridge dashboard; it is documented here so the evaluation result above is meaningful.
{
"id": "64c64cfb47418500082f60b5",
"key": "checkout-cta",
"description": "Call-to-action copy on checkout",
"state": "on-with-rule",
"valueType": "string",
"offValue": "Buy",
"onValue": "Pay now",
"rule": {
"branches": [
{
"conditions": [
{ "attribute": "tenant.plan", "operator": "eq", "values": ["PREMIUM"] }
],
"returnValue": "Pay securely"
}
],
"otherwiseValue": "Pay now",
"rolloutPct": 100
}
}
| Property | Type | Description |
|---|
id | string | Unique ID (read only) |
key | string | Flag key for evaluation |
description | string | Description text |
state | string | off (off for everyone), on (on for everyone), or on-with-rule (on for users matching rule) |
valueType | string | Value type the flag returns: boolean, string, number, or json. Inferred from the configured value |
offValue | typed | Returned when state is off |
onValue | typed | Returned when state is on. Not used by on-with-rule — when a rule is present but no branch matches, the rule’s otherwiseValue is returned instead |
rule | Rule | Targeting rule, present when state is on-with-rule |
{
"branches": [
{
"conditions": [
{ "attribute": "tenant.plan", "operator": "eq", "values": ["PREMIUM"] }
],
"returnValue": "Pay securely"
}
],
"otherwiseValue": "Pay now",
"rolloutPct": 100,
"groupRef": null
}
| Property | Type | Description |
|---|
branches | Branch[] | Evaluated first-match-wins |
otherwiseValue | typed | Returned when no branch matches (variantIndex: -1) |
rolloutPct | number | 0–100; applies to the whole rule. Below 100, evaluation requires a stable identity for deterministic bucketing |
groupRef | string | null | When set, a saved group’s branches are used and inline branches are invalid |
| Property | Type | Description |
|---|
conditions | Condition[] | AND-ed; a branch matches when all conditions match |
returnValue | typed | Returned when this branch matches (variantIndex = the branch’s zero-based index) |
{ "attribute": "tenant.plan", "operator": "eq", "values": ["PREMIUM"] }
| Property | Type | Description |
|---|
attribute | string | Dotted-path attribute key from the evaluation context (e.g. user.role, tenant.plan, device.key, custom.*) |
operator | string | One of the operators below |
values | (string | number | boolean | null)[] | Comparison value(s) |
| Operator | Description |
|---|
eq | Equal to |
neq | Not equal to |
contains | Contains value |
not_contains | Does not contain value |
in | In the given list |
not_in | Not in the given list |
gt | Greater than |
lt | Less than |
between | Between two values (inclusive) |
regex | Matches a regular expression |
exists | Attribute is present |
not_exists | Attribute is absent |
Legacy (FF 1.x). Earlier flags used a enabled / targetValue / defaultValue / segments matrix with standalone Segment objects. That model is superseded by the three-state model above; the old segment-management REST endpoints are no longer part of the public surface. See Feature Flags.