User Management
This guide explains how to manage users and their tenants using SuperTokens and our API endpoints.
Overview
- Users are managed through SuperTokens
- A user can belong to multiple tenants
- Each user has one role per tenant
- All operations require admin authentication
Available Roles
admin- Administrator accessinternal-dim- Internal DIM usercustomer-dim- Customer DIM usertim- TIM user
SuperTokens Dashboard
Access the SuperTokens dashboard to view and manage users:
- Local/Staging: https://coding.staging.beparallel.com/auth/dashboard/tenants
- Production: https://coding.app.beparallel.com/auth/dashboard/tenants
1. Add a Tenant to a User
This endpoint associates a user with a tenant.
Endpoint
POST /tenants/add-user/:userIdParameters
userId(path parameter): UUID of the user to add to the tenant
Request Body
json
{
"tenantId": "tenant-123",
"role": "admin"
}2. Add a Role to User for All Tenants
This endpoint assigns a specific role to a user across all their associated tenants.
Endpoint
POST /tenants/add-role-to-user/:userIdParameters
userId(path parameter): UUID of the user to assign the role to
Request Body
json
{
"role": "admin"
}Authentication
All endpoints require admin authentication. Ensure your request includes valid admin credentials in the headers. You will use the x-api-key saved in Postman Parallel Workspace