Use this file to discover all available pages before exploring further.
This guide walks through the full workflow for creating and managing users via the WisdomAI GraphQL API. User attributes are key-value pairs attached to a user that drive parameterized connection resolution, row-level authorization, and personalized data access.Workflow in short:
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
Access token: A valid bearer token with iam:write permission — contact support@askwisdom.ai to 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.
Use createUsers 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.
Use setUserAttributes to replace the DATABASE-sourced attributes on an existing user at any time.
setUserAttributesreplaces all DATABASE-sourced attributes. Always include the full desired set — omitting an attribute removes it. JWT-sourced attributes (from SSO claims) are not affected.
This action is irreversible. Deleted users lose all role assignments, attributes, and access to the workspace. Verify the correct user IDs before calling this mutation.
Step 5: Impersonate a user to start an embedded session
Use impersonateUser 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.
WisdomAI will request a new token automatically via postMessage before expiry. See Impersonate user for the full refresh flow.
Attributes that are stable for a given user (such as account_id) should be set permanently via createUsers or setUserAttributes. Attributes that change per session (such as a selected view or context) can be passed transiently via attributes in impersonateUser.