Users API
Manage users within a tenant — list, retrieve, update, delete, and manage role assignments. All endpoints require authentication and operate within the tenant context from the access token.
Base URL: https://id.vyntech.com.au/api/v1 — All endpoints on this page require a valid access token. The tenant is inferred from the tid claim in the JWT — you cannot access users from other tenants.
Get Current User
Returns the profile of the currently authenticated user. This is the most common endpoint for frontend apps to fetch user data after login.
/api/v1/users/me🔒 AuthGet the authenticated user's profile.
List Users
Returns a paginated list of users within the tenant. Supports filtering by status, email search, and role. Requires users:read permission.
/api/v1/users🔒 AuthList users in the current tenant with pagination and filtering.
Query Parameters
pageintegerPage number for paginationdefault: 1per_pageintegerResults per page (max 100)default: 20statusstringFilter by status: active, suspended, or pendingdefault: —searchstringSearch by email or display_name (partial match)default: —rolestringFilter by role name (exact match)default: —sortstringSort field: created_at, email, last_login_atdefault: created_atorderstringSort order: asc or descdefault: descGet User
Returns the full profile of a specific user by ID. Requires users:read permission.
/api/v1/users/:id🔒 AuthGet a specific user by ID.
Update User
Updates a user's profile fields. Only provided fields are updated (partial update). Requires users:write permission, or the user can update their own profile without this permission.
/api/v1/users/:id🔒 AuthUpdate a user's profile (partial update).
{
"display_name": "Jane M. Smith",
"status": "active"
}Updatable Fields
display_namestringUser's display name (1-100 characters)statusstringactive or suspended — only admins with users:write can change thisDelete User
Permanently deletes a user and all associated data (sessions, role assignments, MFA config). This action is irreversible. Requires users:write permission.
/api/v1/users/:id🔒 AuthPermanently delete a user and all their data.
Get User Roles
Returns all roles assigned to a specific user, including the permissions each role grants.
/api/v1/users/:id/roles🔒 AuthList all roles assigned to a user.
Assign Role
Assigns a role to a user. The role must exist within the tenant. If the user already has this role, the request is idempotent (returns 200 without error). Requires roles:manage permission.
/api/v1/users/:id/roles🔒 AuthAssign a role to a user.
{
"role_id": "rol_01H8MNOP2Q4R6S8T"
}Revoke Role
Removes a role from a user. The user's effective permissions are recalculated immediately. Existing access tokens retain the old permissions until they expire. Requires roles:manage permission.
/api/v1/users/:id/roles/:role_id🔒 AuthRevoke a role from a user.
Reset User MFA
Disables MFA for a user (admin action). Use this when a user has lost access to their authenticator app. The user will need to re-enroll MFA on their next login if the tenant enforces it. Requires users:write permission.
/api/v1/users/:id/reset-mfa🔒 AuthDisable MFA for a user (admin action).
Resend User Verification
Triggers a new verification email for a user whose email is not yet verified (admin action). Useful when the original verification email was lost or expired. Requires users:write permission.
/api/v1/users/:id/resend-verification🔒 AuthSend a new verification email to an unverified user (admin action).