TheDocumentation Index
Fetch the complete documentation index at: https://docs.wisdom.ai/llms.txt
Use this file to discover all available pages before exploring further.
createUsers mutation provisions one or more users in a workspace. Call this before impersonating a user in the embedded flow — a user must exist before they can be impersonated.
Signature
Arguments
Input object containing the details for the users to create.
CreateUsersInput fields
One or more email addresses to provision. User matching is email-based — each email must be unique within the workspace.
If your embedded users may share email addresses across tenants (e.g., the same person is a customer of multiple clients), append a unique identifier to the email prefix:
alice+tenant123@yourcompany.com. This prevents cross-tenant session collisions.The workspace to create the users in. Required for multi-workspace deployments.
Role assignments for the new users. Each entry specifies a
roleId and scopes. See RoleAssignmentInput.For embedded dashboards, assign the Viewer role to hide edit controls:Whether to send a welcome email to the new users. Default:
false. Set to false for programmatically provisioned embedded users.Key-value pairs for parameterized connections and row-level data access. These are stored as DATABASE-sourced attributes. See User attributes.
Optional group IDs to assign the users to on creation.
CreateUsersInput does not include a display name field. Users provisioned via this mutation appear as their email address in the WisdomAI admin screen. If a display name is needed, pass it as a userAttributes entry (for example, { "key": "display_name", "value": "Alice Smith" }).Response
Indicates whether the operation succeeded. See ResponseStatus.
The
status field here returns a ResponseStatus object (with code and message). This is distinct from the UserStatus enum (e.g., ACTIVE) found on the User object.Usage example
Related articles
Set user attributes
Update attributes on existing users
Impersonate user
Generate a session JWT for the created user
User attributes
How attributes control data access
Embedding overview
Full server-side embedding flow