Account Guide
Overview
The SYSTEM account domain begins after authentication and covers the user-controlled parts of the portal experience: profile data, onboarding decisions, security posture, session hygiene, and invitation inbox behavior. These calls are what turn a fresh JWT into a usable application session.
What This Domain Covers
- own profile retrieval and update
- onboarding and post-login routing decisions
- password initialization for new or invited users
- MFA, backup codes, IP whitelist, and session controls
- invitation listing, acceptance, and decline flows
Common Prerequisites
Authorization: Bearer <accessToken>X-PORTAL-ACCESS-CODE: <system-portal-code>- secure-channel support for encrypted security mutations
- a consistent understanding of the current workspace and invitation context
Shared Request Pattern
Profile and read-only security calls:
bash
curl 'https://api.example.com/web/v1/tenant/profile' \
-H 'X-PORTAL-ACCESS-CODE: <system-portal-code>' \
-H 'Authorization: Bearer <accessToken>'Sensitive mutations add a secure-channel header:
bash
X-Secure-Channel-Session-Id: <secure-channel-session-id>Core Endpoints
Profile
GET /web/v1/tenant/profilePOST /web/v1/tenant/profile/updatePOST /web/v1/tenant/auth/password/init
Security
GET /web/v1/tenant/security/mfaPOST /web/v1/tenant/security/mfa/otp/setupPOST /web/v1/tenant/security/mfa/otp/verifyGET /web/v1/tenant/security/ip-whitelistPOST /web/v1/tenant/security/ip-whitelistPOST /web/v1/tenant/security/sessions/terminate
Invitations
GET /web/v1/tenant/profile/invitationsPOST /web/v1/tenant/profile/invitations/{invitationBizId}/acceptPOST /web/v1/tenant/profile/invitations/{invitationBizId}/decline
Typical Session Bootstrap
A newly authenticated SYSTEM UI usually follows this sequence:
- fetch
/web/v1/tenant/profile - fetch
/web/v1/tenant/workspaces/mine - fetch
/web/v1/tenant/profile/invitationswhen routing depends on pending invites - branch into app entry, workspace selection, create-workspace, or invitation handling
Decision Points
- whether the user is entering as a normal returning admin or a newly invited account
- whether the user still needs to initialize a password
- whether MFA must be enabled before the app can continue
- whether the user has an accessible default workspace
- whether pending invitations should override the standard landing page
Error Handling
4010almost always means the JWT is missing, expired, or attached to the wrong portal ingress- profile update and security mutations can fail if the secure-channel context is missing
- invitation actions can fail with conflict errors when the invitation is already processed or expired
- onboarding logic should not assume that workspace data or invitation data is embedded in the profile payload
- if session-related calls fail, retry after refreshing the access token before forcing a full logout
Recommended Guide Order
- start with Profile and Onboarding
- then implement Security and Invitations
- connect the result to Workspace Guide