Skip to content
Get started

Update a user

UserUpdateResponse viewer().users().update(UserUpdateParamsparams = UserUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
patch/v1/viewer/users/{userId}

Updates a user's profile information, permissions, and access level. All fields are optional - only provided fields will be updated. Email cannot be changed via API.

ParametersExpand Collapse
UserUpdateParams params
Optional<String> userId

Unique user identifier. Format: usr_{32-hex-chars}

Optional<Boolean> canManageStudies
Optional<ClinicRole> clinicRole
RADIOLOGIST("Radiologist")
CARDIOLOGIST("Cardiologist")
NEUROLOGIST("Neurologist")
UROLOGIST("Urologist")
GYNECOLOGIST("Gynecologist")
ENDOCRINOLOGIST("Endocrinologist")
DOCTOR("Doctor")
SURGEON("Surgeon")
PHYSICIAN("Physician")
PHYSICIAN_ASSISTANT("Physician Assistant")
NURSE_PRACTITIONER("Nurse Practitioner")
REGISTERED_NURSE("Registered Nurse")
PATIENT_CARE_COORDINATOR("Patient Care Coordinator")
FRONT_DESK_OPERATOR("Front Desk Operator")
IMAGING_TECHNOLOGIST("Imaging Technologist")
PACS_ADMINISTRATOR("PACS Administrator")
SOFTWARE_ENGINEER("Software Engineer")
REVENUE_CYCLE_MANAGER("Revenue Cycle Manager")
ADMINISTRATIVE_DIRECTOR("Administrative Director")
ADMINISTRATIVE_ASSISTANT("Administrative Assistant")
OTHER("Other")
Optional<String> firstName

User's first name

minLength1
Optional<Boolean> hasDashboardAccess

Whether the user can access the dashboard interface. Required for admin users

Optional<String> lastName

User's last name

minLength1
Optional<Level> level
ADMIN("admin")
MEMBER("member")
Optional<String> middleName
minLength1
Optional<String> phoneNumber
Optional<String> suffix1
minLength1
Optional<String> suffix2
minLength1
ReturnsExpand Collapse
class UserUpdateResponse:

A user in the Viewer system with study management permissions

boolean canManageStudies

Whether the user has permission to create, update, and manage studies

ClinicRole clinicRole

User's clinical or organizational role

Accepts one of the following:
RADIOLOGIST("Radiologist")
CARDIOLOGIST("Cardiologist")
NEUROLOGIST("Neurologist")
UROLOGIST("Urologist")
GYNECOLOGIST("Gynecologist")
ENDOCRINOLOGIST("Endocrinologist")
DOCTOR("Doctor")
SURGEON("Surgeon")
PHYSICIAN("Physician")
PHYSICIAN_ASSISTANT("Physician Assistant")
NURSE_PRACTITIONER("Nurse Practitioner")
REGISTERED_NURSE("Registered Nurse")
PATIENT_CARE_COORDINATOR("Patient Care Coordinator")
FRONT_DESK_OPERATOR("Front Desk Operator")
IMAGING_TECHNOLOGIST("Imaging Technologist")
PACS_ADMINISTRATOR("PACS Administrator")
SOFTWARE_ENGINEER("Software Engineer")
REVENUE_CYCLE_MANAGER("Revenue Cycle Manager")
ADMINISTRATIVE_DIRECTOR("Administrative Director")
ADMINISTRATIVE_ASSISTANT("Administrative Assistant")
OTHER("Other")
Optional<LocalDateTime> createdAt

Timestamp when the user was created

formatdate-time
String email

User's email address for login and notifications

String firstName

User's first name

minLength1
boolean hasDashboardAccess

Whether the user can access the dashboard interface. Required for admin users

InvitedSource invitedSource

How the user was invited - via dashboard UI or API

Accepts one of the following:
DASHBOARD("dashboard")
API("api")
Optional<LocalDateTime> lastLoginAt

Timestamp of user's last login, null if never logged in

formatdate-time
String lastName

User's last name

minLength1
Level level

User access level. 'owner' has full control, 'admin' can manage users/settings, 'member' has standard access

Accepts one of the following:
OWNER("owner")
ADMIN("admin")
MEMBER("member")
String userId

Unique user identifier. Format: usr_{32-hex-chars}

Optional<String> middleName

User's middle name (optional)

minLength1
Optional<String> phoneNumber

User's phone number (10-15 digits, optional)

Optional<String> suffix1

Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional

minLength1
Optional<String> suffix2

Additional name suffix (optional)

minLength1
Update a user
package com.avara.example;

import com.avara.client.AvaraClient;
import com.avara.client.okhttp.AvaraOkHttpClient;
import com.avara.models.viewer.users.UserUpdateParams;
import com.avara.models.viewer.users.UserUpdateResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AvaraClient client = AvaraOkHttpClient.fromEnv();

        UserUpdateResponse user = client.viewer().users().update("usr_1234567890abcdef1234567890abcdef");
    }
}
{
  "canManageStudies": true,
  "clinicRole": "Radiologist",
  "createdAt": "2024-01-15T10:00:00Z",
  "email": "dr.johnson@hospital.org",
  "firstName": "Sarah",
  "hasDashboardAccess": true,
  "invitedSource": "api",
  "lastLoginAt": "2024-03-15T09:00:00Z",
  "lastName": "Johnson",
  "level": "member",
  "userId": "usr_1234567890abcdef1234567890abcdef",
  "middleName": "Marie",
  "phoneNumber": "5551234567",
  "suffix1": "MD",
  "suffix2": "FACR"
}
Returns Examples
{
  "canManageStudies": true,
  "clinicRole": "Radiologist",
  "createdAt": "2024-01-15T10:00:00Z",
  "email": "dr.johnson@hospital.org",
  "firstName": "Sarah",
  "hasDashboardAccess": true,
  "invitedSource": "api",
  "lastLoginAt": "2024-03-15T09:00:00Z",
  "lastName": "Johnson",
  "level": "member",
  "userId": "usr_1234567890abcdef1234567890abcdef",
  "middleName": "Marie",
  "phoneNumber": "5551234567",
  "suffix1": "MD",
  "suffix2": "FACR"
}