Docs/Account/API/Users

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.

GET/api/v1/users/me🔒 Auth

Get the authenticated user's profile.

curl https://id.vyntech.com.au/api/v1/users/me \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

List Users

Returns a paginated list of users within the tenant. Supports filtering by status, email search, and role. Requires users:read permission.

GET/api/v1/users🔒 Auth

List users in the current tenant with pagination and filtering.

curl "https://id.vyntech.com.au/api/v1/users?page=1&per_page=20&status=active" \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

Query Parameters

pageintegerPage number for paginationdefault: 1
per_pageintegerResults per page (max 100)default: 20
statusstringFilter 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_at
orderstringSort order: asc or descdefault: desc

Get User

Returns the full profile of a specific user by ID. Requires users:read permission.

GET/api/v1/users/:id🔒 Auth

Get a specific user by ID.

curl https://id.vyntech.com.au/api/v1/users/usr_01H8KXYZ4F2B7NQ9RPWT3M6J \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

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.

PATCH/api/v1/users/:id🔒 Auth

Update a user's profile (partial update).

curl -X PATCH https://id.vyntech.com.au/api/v1/users/usr_01H8KXYZ4F2B7NQ9RPWT3M6J \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..." \ -H "Content-Type: application/json" \ -d '{ "display_name": "Jane M. Smith", "status": "active" }'
Request Body
{
  "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 this

Delete User

Permanently deletes a user and all associated data (sessions, role assignments, MFA config). This action is irreversible. Requires users:write permission.

DELETE/api/v1/users/:id🔒 Auth

Permanently delete a user and all their data.

curl -X DELETE https://id.vyntech.com.au/api/v1/users/usr_01H8KXYZ4F2B7NQ9RPWT3M6J \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

Get User Roles

Returns all roles assigned to a specific user, including the permissions each role grants.

GET/api/v1/users/:id/roles🔒 Auth

List all roles assigned to a user.

curl https://id.vyntech.com.au/api/v1/users/usr_01H8KXYZ4F2B7NQ9RPWT3M6J/roles \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

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.

POST/api/v1/users/:id/roles🔒 Auth

Assign a role to a user.

curl -X POST https://id.vyntech.com.au/api/v1/users/usr_01H8KXYZ4F2B7NQ9RPWT3M6J/roles \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..." \ -H "Content-Type: application/json" \ -d '{"role_id": "rol_01H8MNOP2Q4R6S8T"}'
Request Body
{
  "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.

DELETE/api/v1/users/:id/roles/:role_id🔒 Auth

Revoke a role from a user.

curl -X DELETE https://id.vyntech.com.au/api/v1/users/usr_01H8KXYZ4F2B7NQ9RPWT3M6J/roles/rol_01H8MNOP2Q4R6S8T \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

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.

POST/api/v1/users/:id/reset-mfa🔒 Auth

Disable MFA for a user (admin action).

curl -X POST https://id.vyntech.com.au/api/v1/users/usr_01H8KXYZ4F2B7NQ9RPWT3M6J/reset-mfa \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

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.

POST/api/v1/users/:id/resend-verification🔒 Auth

Send a new verification email to an unverified user (admin action).

curl -X POST https://id.vyntech.com.au/api/v1/users/usr_01H8KXYZ4F2B7NQ9RPWT3M6J/resend-verification \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

What's Next

We use cookies and similar technologies to measure traffic and improve the site. You can choose which categories to allow. Manage Preferences.