Skip to content

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 access
  • internal-dim - Internal DIM user
  • customer-dim - Customer DIM user
  • tim - TIM user

SuperTokens Dashboard

Access the SuperTokens dashboard to view and manage users:

1. Add a Tenant to a User

This endpoint associates a user with a tenant.

Endpoint

POST /tenants/add-user/:userId

Parameters

  • 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/:userId

Parameters

  • 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