Create and invite a new user
UserInviteResponse viewer().users().invite(UserInviteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
/v1/viewer/users
Creates a new user in the Viewer system and sends them an invitation email. The user will have the specified permissions and access level. Dashboard access can be enabled to allow login.
Parameters
Returns
Create and invite a new user
package com.avara.example;
import com.avara.client.AvaraClient;
import com.avara.client.okhttp.AvaraOkHttpClient;
import com.avara.models.viewer.users.UserInviteParams;
import com.avara.models.viewer.users.UserInviteResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
AvaraClient client = AvaraOkHttpClient.fromEnv();
UserInviteParams params = UserInviteParams.builder()
.canManageStudies(true)
.clinicRole(UserInviteParams.ClinicRole.RADIOLOGIST)
.email("dr.johnson@hospital.org")
.firstName("Sarah")
.hasDashboardAccess(true)
.lastName("Johnson")
.level(UserInviteParams.Level.MEMBER)
.build();
UserInviteResponse response = client.viewer().users().invite(params);
}
}
{
"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"
}