Skip to main content

Superadmin Guide

Superadmin users can view and manage data across all organizations on the HatiData platform. This role is designed for platform operators who need cross-org visibility for support, debugging, or compliance investigations.

How It Works

  1. Set hd_role: "superadmin" in the user's Clerk public metadata.
  2. The Control Plane recognizes the role during JWT validation and grants cross-org access.
  3. The dashboard shows a gold SUPERADMIN badge next to the user's name and an org switcher dropdown in the top navigation.

Org Impersonation

To view data as another organization, send the X-HatiData-Org-Id: <org-uuid> header with any API request. The dashboard does this automatically when you select an org from the switcher dropdown.

While impersonating, the dashboard header displays a banner indicating which org you are viewing. All queries, memory reads, and audit log views are scoped to the selected org.

Security

  • Controlled via Clerk metadata only. Superadmin status is set in Clerk's user management UI or API — it is not configurable through the HatiData database or dashboard.
  • Full audit trail. Every action taken while impersonating another org is logged with the superadmin's identity and the impersonated org context.
  • No self-promotion. Superadmins cannot grant the superadmin role to other users through the API. This must be done directly in Clerk.

Stay in the loop

Product updates, engineering deep-dives, and agent-native insights. No spam.