Skip to content

Users

Tenant users represent the individual accounts that belong to a specific tenant within your application. You can list, create, update, and delete users as well as manage their roles, team memberships, and passwords.

All user endpoints under /tenant/user require the x-tenant-id header to identify the tenant context.


Retrieve all users that belong to a specific tenant.

GET https://api.thebridge.dev/account/tenant/user

HTTP 200 — Returns an array of user objects for the tenant.

Request example

curl --request GET 'https://api.thebridge.dev/account/tenant/user' \
--header 'x-api-key: YOUR_APP_API_KEY' \
--header 'x-tenant-id: YOUR_TENANT_ID'

Response example:

[
{
"id": "63cad6ac48dcba47e9322853",
"role": "OWNER",
"email": "john.doe@example.com",
"username": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"onboarded": true,
"enabled": true,
"teams": ["cool_gang"],
"lastSeen": "2023-01-20T18:00:12.489Z",
"createdAt": "2023-01-20T18:00:12.489Z"
}
]
GET Try it out
GET https://api.thebridge.dev/account/tenant/user
Stored in session memory only. Never persisted.

Retrieve a single user by their unique identifier.

GET https://api.thebridge.dev/account/tenant/user/:USER_ID

HTTP 200 — Returns the user object.

Request example

curl --request GET 'https://api.thebridge.dev/account/tenant/user/63cad6ac48dcba47e9322853' \
--header 'x-api-key: YOUR_APP_API_KEY' \
--header 'x-tenant-id: YOUR_TENANT_ID'

Response example:

{
"id": "63cad6ac48dcba47e9322853",
"role": "OWNER",
"email": "john.doe@example.com",
"username": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"onboarded": true,
"enabled": true,
"teams": ["cool_gang"],
"lastSeen": "2023-01-20T18:00:12.489Z",
"createdAt": "2023-01-20T18:00:12.489Z"
}
GET Try it out
GET https://api.thebridge.dev/account/tenant/user/:USER_ID
Stored in session memory only. Never persisted.
The unique ID of the user

List all tenant associations for a specific user. This is useful for finding which tenants a user belongs to.

GET https://api.thebridge.dev/account/tenant/user/:USER_ID/associations

HTTP 200 — Returns an array of tenant associations for the user.

Request example

curl --request GET 'https://api.thebridge.dev/account/tenant/user/63cad6ac48dcba47e9322853/associations' \
--header 'x-api-key: YOUR_APP_API_KEY' \
--header 'x-tenant-id: YOUR_TENANT_ID'

Response example:

[
{
"tenantId": "624c14cc0c01e70033356282",
"tenantName": "My Workspace",
"role": "OWNER"
}
]
GET Try it out
GET https://api.thebridge.dev/account/tenant/user/:USER_ID/associations
Stored in session memory only. Never persisted.
The unique ID of the user

Create a new user within a tenant. The user will receive an onboarding email with a link to set their password.

POST https://api.thebridge.dev/account/tenant/user

Body Parameters

ParameterTypeRequiredDescription
usernamestringRequiredThe email address or username for the new user
rolestringOptionalThe role key to assign (e.g. OWNER, ADMIN). Defaults to the app's default role
firstNamestringOptionalThe user's first name
lastNamestringOptionalThe user's last name
muteNotificationsbooleanOptionalIf true, the user will not receive the onboarding email

HTTP 201 — Returns the created user object.

Request example

curl --request POST 'https://api.thebridge.dev/account/tenant/user' \
--header 'x-api-key: YOUR_APP_API_KEY' \
--header 'x-tenant-id: YOUR_TENANT_ID' \
--header 'Content-Type: application/json' \
--data-raw '{
  "username": "jane.smith@example.com",
  "role": "ADMIN",
  "firstName": "Jane",
  "lastName": "Smith",
  "muteNotifications": false
}'

Response example:

{
"id": "64ab1f2e48dcba47e9344567",
"role": "ADMIN",
"email": "jane.smith@example.com",
"username": "jane.smith@example.com",
"firstName": "Jane",
"lastName": "Smith",
"fullName": "Jane Smith",
"onboarded": false,
"enabled": true,
"teams": [],
"createdAt": "2023-07-10T12:30:00.000Z"
}
POST Try it out
POST https://api.thebridge.dev/account/tenant/user
Stored in session memory only. Never persisted.

Update an existing user’s role, enabled status, or team memberships.

PUT https://api.thebridge.dev/account/tenant/user/:USER_ID

Body Parameters

ParameterTypeRequiredDescription
rolestringOptionalThe role key to assign to the user
enabledbooleanOptionalEnable or disable the user account
teamsstring[]OptionalA list of team identifiers the user belongs to

HTTP 200 — Returns the updated user object.

Request example

curl --request PUT 'https://api.thebridge.dev/account/tenant/user/63cad6ac48dcba47e9322853' \
--header 'x-api-key: YOUR_APP_API_KEY' \
--header 'x-tenant-id: YOUR_TENANT_ID' \
--header 'Content-Type: application/json' \
--data-raw '{
  "role": "ADMIN",
  "enabled": true,
  "teams": ["engineering", "design"]
}'

Response example:

{
"id": "63cad6ac48dcba47e9322853",
"role": "ADMIN",
"email": "john.doe@example.com",
"username": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"onboarded": true,
"enabled": true,
"teams": ["engineering", "design"],
"lastSeen": "2023-01-20T18:00:12.489Z",
"createdAt": "2023-01-20T18:00:12.489Z"
}
PUT Try it out
PUT https://api.thebridge.dev/account/tenant/user/:USER_ID
Stored in session memory only. Never persisted.
The unique ID of the user to update

Trigger a password reset for a user. The user will receive an email with a link to set a new password.

POST https://api.thebridge.dev/account/tenant/user/:USER_ID/password

HTTP 200 — Empty body on success.

Request example

curl --request POST 'https://api.thebridge.dev/account/tenant/user/63cad6ac48dcba47e9322853/password' \
--header 'x-api-key: YOUR_APP_API_KEY' \
--header 'x-tenant-id: YOUR_TENANT_ID'

Response example:

{}
POST Try it out
POST https://api.thebridge.dev/account/tenant/user/:USER_ID/password
Stored in session memory only. Never persisted.
The unique ID of the user whose password will be reset

Remove a user from a tenant. This action is irreversible.

DELETE https://api.thebridge.dev/account/tenant/user/:USER_ID

HTTP 200 — Empty body on success.

Request example

curl --request DELETE 'https://api.thebridge.dev/account/tenant/user/63cad6ac48dcba47e9322853' \
--header 'x-api-key: YOUR_APP_API_KEY' \
--header 'x-tenant-id: YOUR_TENANT_ID'

Response example:

{}
DELETE Try it out
DELETE https://api.thebridge.dev/account/tenant/user/:USER_ID
Stored in session memory only. Never persisted.
The unique ID of the user to delete

Redirect a tenant owner or admin to the hosted user management portal. This is a browser redirect, not a direct API call. The portal provides a full UI for managing users without building your own interface.

GET https://api.thebridge.dev/cloud-views/user-management-portal/users?code=XXXX

The user’s browser is redirected to the nblocks user management portal UI. No JSON response is returned.

Request example

# This is a browser redirect URL, not a typical API call.
# Generate a handover code first, then redirect the user's browser:
curl --request GET 'https://api.thebridge.dev/cloud-views/user-management-portal/users?code=HANDOVER_CODE'