- Create one or more users with role assignments and (optionally) attributes
- Update attributes on existing users as needed
- Query users to look up IDs or verify attribute state
- Remove users when offboarding
- Impersonate a user to start an embedded session
Prerequisites
- GraphQL endpoint:
https://{ACCOUNT}.wisdom.ai/graphql - Access token: A valid bearer token with
iam:writepermission — contactsupport@askwisdom.aito obtain one - Workspace ID (optional): Required only for multi-workspace deployments
Replace
{ACCOUNT}.wisdom.ai with the base URL of your WisdomAI tenant — the same domain you use to log in. Both wisdom.ai and askwisdom.ai are valid depending on your deployment.Step 1: Create users
UsecreateUsers to provision one or more users by email. You can assign roles, set initial attributes, add them to user groups, and optionally send a welcome email — all in a single call.
If the user already exists, the call succeeds but re-applies the role assignments you pass in, overwriting any manually assigned roles. To avoid resetting roles on existing users, check listUsers first and skip createUsers for users already provisioned.
Email uniqueness: User matching is email-based. If your embedded users may share email addresses across tenants, append a unique identifier to the email prefix — for example,
alice+tenant123@yourcompany.com. This prevents cross-tenant session collisions.Step 2: Update user attributes
UsesetUserAttributes to replace the DATABASE-sourced attributes on an existing user at any time.
Step 3: Query users and their attributes
UselistUsers to look up user IDs or verify current attribute state.
source field:
Step 4: Delete users from a workspace
UsedeleteUsersFromWorkspace to remove one or more users from a workspace.
Step 5: Impersonate a user to start an embedded session
UseimpersonateUser to generate a short-lived JWT for a user. Pass this JWT as the token query parameter in your iframe embed URL.
This mutation is public and unauthenticated — no Authorization header is required. The access key is passed directly as an argument and must only be called from your server.
src:
postMessage before expiry. See Impersonate user for the full refresh flow.
Related articles
Embedding Overview
Full server-side embedding flow
Delete Users from Workspace
Remove users when offboarding
List Users
Query users and inspect their attributes

