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.
List Users
Section titled “List Users”Retrieve all users that belong to a specific tenant.
HTTP Request
Section titled “HTTP Request”GET https://api.thebridge.dev/account/tenant/user
Response HTTP 200
Section titled “Response HTTP 200”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
https://api.thebridge.dev/account/tenant/userGet User by ID
Section titled “Get User by ID”Retrieve a single user by their unique identifier.
HTTP Request
Section titled “HTTP Request”GET https://api.thebridge.dev/account/tenant/user/:USER_ID
Response HTTP 200
Section titled “Response HTTP 200”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
https://api.thebridge.dev/account/tenant/user/:USER_IDList Tenants by User
Section titled “List Tenants by User”List all tenant associations for a specific user. This is useful for finding which tenants a user belongs to.
HTTP Request
Section titled “HTTP Request”GET https://api.thebridge.dev/account/tenant/user/:USER_ID/associations
Response HTTP 200
Section titled “Response HTTP 200”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
https://api.thebridge.dev/account/tenant/user/:USER_ID/associationsCreate User
Section titled “Create User”Create a new user within a tenant. The user will receive an onboarding email with a link to set their password.
HTTP Request
Section titled “HTTP Request”POST https://api.thebridge.dev/account/tenant/user
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
username | string | Required | The email address or username for the new user |
role | string | Optional | The role key to assign (e.g. OWNER, ADMIN). Defaults to the app's default role |
firstName | string | Optional | The user's first name |
lastName | string | Optional | The user's last name |
muteNotifications | boolean | Optional | If true, the user will not receive the onboarding email |
Response HTTP 201
Section titled “Response HTTP 201”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
https://api.thebridge.dev/account/tenant/userUpdate User
Section titled “Update User”Update an existing user’s role, enabled status, or team memberships.
HTTP Request
Section titled “HTTP Request”PUT https://api.thebridge.dev/account/tenant/user/:USER_ID
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
role | string | Optional | The role key to assign to the user |
enabled | boolean | Optional | Enable or disable the user account |
teams | string[] | Optional | A list of team identifiers the user belongs to |
Response HTTP 200
Section titled “Response HTTP 200”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
https://api.thebridge.dev/account/tenant/user/:USER_IDReset User Password
Section titled “Reset User Password”Trigger a password reset for a user. The user will receive an email with a link to set a new password.
HTTP Request
Section titled “HTTP Request”POST https://api.thebridge.dev/account/tenant/user/:USER_ID/password
Response HTTP 200
Section titled “Response HTTP 200”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
https://api.thebridge.dev/account/tenant/user/:USER_ID/passwordDelete User
Section titled “Delete User”Remove a user from a tenant. This action is irreversible.
HTTP Request
Section titled “HTTP Request”DELETE https://api.thebridge.dev/account/tenant/user/:USER_ID
Response HTTP 200
Section titled “Response HTTP 200”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
https://api.thebridge.dev/account/tenant/user/:USER_IDUser Management Portal
Section titled “User Management Portal”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.
HTTP Request
Section titled “HTTP Request”GET https://api.thebridge.dev/cloud-views/user-management-portal/users?code=XXXX
Response
Section titled “Response”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'