Overview
This guide covers the user-management endpoints reachable with a client key: listing users, reading the caller’s context, provisioning new users (with or without SSO), updating profiles, changing roles, setting passwords/PINs, activating/deactivating, and removing users.Creating users is done through the Provision Users
endpoint (
POST /api/v1/mgt/users/provision) — which works whether or not the workspace uses SSO; see
the Single Sign-On guide for how it interacts with SSO’s own automatic
provisioning. The admin “register user” routes are not accessible via API key. Most actions here
enforce the key’s default-user permissions (e.g. CAN_MANAGE_USERS, CAN_MANAGE_USER_ROLES) — the
required permission is noted per section below — so choose a default user whose role grants what your
integration needs. (Provisioning has no separate permission gate.)Authentication & base URL
All requests go tohttps://api.xenia.team; every path starts with /api/v1. Authenticate with:
{workspaceId} it must be your key’s own
workspace; most user routes also accept an unscoped form (e.g. /api/v1/mgt/users/{userId}/role) and
resolve the workspace from the key automatically.
Response envelopes: list/read endpoints return
{ data, meta }; message-style endpoints return
{ data, extra_meta: { message } }; user-context returns { data, message, extra_meta: { token } }.
There is no status/statusCode/success/requestId field. Successful POST/PATCH/PUT
calls return HTTP 200.List Users
Retrieve users in your workspace. Endpoint:GET /api/v1/mgt/workspaces/{workspaceId}/users
offset or limit returns a 422.
Response:
UserWorkspaces holds a user’s membership per workspace (role, status, default location, admin flag);
UserWorkspace (singular) is the membership for your key’s workspace; UserLocations lists assigned
location IDs.Membership statuses
Get User Context
Return the caller’s identity, workspace memberships, features, and permissions. When nox-client-user is supplied, this reflects the key’s default user.
Endpoint: GET /api/v1/mgt/user-context
Provision Users (create / sync)
Create new users or sync existing ones for a workspace in a single call — the API-key path for programmatic user creation. New users are created and existing ones (matched by email) have their role and location memberships updated. Endpoint:POST /api/v1/mgt/users/provision
Resolve valid
role_id and location_ids with the workspace-discovery reads — see the
Roles API and
Locations API.errors (e.g. { "email": "...", "error": "Invalid role_id: ..." })
without failing the whole batch.
Update User Profile
Modify a user’s profile fields. Endpoint:PATCH /api/v1/mgt/users/{userId}/profile
Response:
Change User Role
Update the role assigned to a user.roleId goes in the body (the path ends at /role).
Endpoint: PATCH /api/v1/mgt/users/{userId}/role
Deactivate User
Set a user’s workspace membership toInactive without removing them.
Endpoint: PATCH /api/v1/mgt/users/{userId}/deactivate
CAN_MANAGE_USERS.
Set User Status
Explicitly set a user’s membership status. Valid values areActive and Inactive only
(transitions to/from Pending are rejected). Use status/Active to reactivate a deactivated user.
Endpoint: PATCH /api/v1/mgt/users/{userId}/status/{status}
Set User Password
Set or reset a user’s password. The target user is identified in the body, not the path. Endpoint:PATCH /api/v1/mgt/set-password
Response:
Requires
CAN_MANAGE_USERS and CAN_MANAGE_USERS_PASSWORD. Setting the password also activates the
user’s membership. A workspace-scoped variant PATCH /api/v1/mgt/workspaces/{workspaceId}/set-password
also exists.Set User Login PIN
Set a numeric login PIN (mobile quick-login). The target user is identified in the body. Because a PIN lets the target user sign in, this is a privileged action: the key’s user must holdCAN_MANAGE_USERS and CAN_MANAGE_USERS_PASSWORD (same as setting a password) — otherwise the call returns 403.
Endpoint: PUT /api/v1/mgt/set-login-pin
Response:
Delete User
Remove a user from the workspace. This soft-deletes the workspace membership (and location memberships); the underlying user account is hard-deleted only if they have no remaining workspaces. Endpoint:DELETE /api/v1/mgt/users/{userId}
Permissions Required
The admin “register user” routes (
/api/v1/admin/...) are not on the API-key allow-list. Use
POST /api/v1/mgt/users/provision for programmatic user creation.Next Steps
Roles API
List workspace roles to resolve
role_idLocations API
List locations to resolve
location_idsSingle Sign-On guide
How SSO login, just-in-time provisioning, and deactivation work together