Skip to content
Get started

Update an invitation

InvitationUpdateResponse viewer().users().invitations().update(InvitationUpdateParamsparams = InvitationUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
patch/v1/viewer/users/invitations/{invitationId}

Updates a pending invitation's user details and permissions before it is accepted. Only valid for invitations that have not expired or been processed.

ParametersExpand Collapse
InvitationUpdateParams params
Optional<String> invitationId

Unique invitation identifier. Format: inv_{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

Invited user's first name

minLength1
Optional<Boolean> hasDashboardAccess

Whether the invited user will have dashboard access

Optional<String> lastName

Invited 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 InvitationUpdateResponse:

A pending user invitation in the Viewer system

boolean canManageStudies

Whether the invited user will have permission to manage studies

String clinicId

UUID of the clinic this invitation belongs to

formatuuid
ClinicRole clinicRole

Clinical or organizational role for the invited user

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 invitation was created

formatdate-time
String email

Email address the invitation was sent to

Optional<LocalDateTime> expiry

When the invitation expires, null if no expiration

formatdate-time
String firstName

Invited user's first name

minLength1
boolean hasDashboardAccess

Whether the invited user will have dashboard access

String invitationId

Unique invitation identifier. Format: inv_{32-hex-chars}

InvitedSource invitedSource

How the invitation was created - 'dashboard' or 'api'

Accepts one of the following:
DASHBOARD("dashboard")
API("api")
String inviterId

User ID of the person who sent the invitation. Format: usr_{32-hex-chars}. Null if invited via API

String lastName

Invited user's last name

minLength1
Level level

Access level for the invited user. 'admin' or 'member' when created via API

Accepts one of the following:
OWNER("owner")
ADMIN("admin")
MEMBER("member")
Status status

Invitation status: 'sent', 'accepted', 'rejected', or 'revoked'

Accepts one of the following:
SENT("sent")
ACCEPTED("accepted")
REJECTED("rejected")
REVOKED("revoked")
Optional<LocalDateTime> updatedAt

Timestamp when the invitation was last updated

formatdate-time
String userId

Pre-generated user ID for this invitation. Format: usr_{32-hex-chars}. This ID is assigned at invitation creation and will become the user's permanent ID upon acceptance

Optional<String> invitedByApiKeyId

UUID of the API key used to send this invitation. Null if sent via dashboard

formatuuid
Optional<String> middleName

Invited user's middle name (optional)

minLength1
Optional<String> phoneNumber

Invited user's phone number (optional)

Optional<String> suffix1

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

minLength1
Optional<String> suffix2

Additional name suffix - optional

minLength1
Update an invitation
package com.avara.example;

import com.avara.client.AvaraClient;
import com.avara.client.okhttp.AvaraOkHttpClient;
import com.avara.models.viewer.users.invitations.InvitationUpdateParams;
import com.avara.models.viewer.users.invitations.InvitationUpdateResponse;

public final class Main {
    private Main() {}

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

        InvitationUpdateResponse invitation = client.viewer().users().invitations().update("inv_1234567890abcdef1234567890abcdef");
    }
}
{
  "canManageStudies": true,
  "clinicId": "550e8400-e29b-41d4-a716-446655440000",
  "clinicRole": "Radiologist",
  "createdAt": "2024-03-15T10:00:00Z",
  "email": "dr.chen@hospital.org",
  "expiry": "2024-04-15T00:00:00Z",
  "firstName": "Michael",
  "hasDashboardAccess": true,
  "invitationId": "inv_1234567890abcdef1234567890abcdef",
  "invitedSource": "api",
  "inviterId": "usr_1234567890abcdef1234567890abcdef",
  "lastName": "Chen",
  "level": "member",
  "status": "sent",
  "updatedAt": "2024-03-15T10:00:00Z",
  "userId": "usr_1234567890abcdef1234567890abcdef",
  "invitedByApiKeyId": "550e8400-e29b-41d4-a716-446655440000",
  "middleName": "David",
  "phoneNumber": "5551234567",
  "suffix1": "MD",
  "suffix2": null
}
Returns Examples
{
  "canManageStudies": true,
  "clinicId": "550e8400-e29b-41d4-a716-446655440000",
  "clinicRole": "Radiologist",
  "createdAt": "2024-03-15T10:00:00Z",
  "email": "dr.chen@hospital.org",
  "expiry": "2024-04-15T00:00:00Z",
  "firstName": "Michael",
  "hasDashboardAccess": true,
  "invitationId": "inv_1234567890abcdef1234567890abcdef",
  "invitedSource": "api",
  "inviterId": "usr_1234567890abcdef1234567890abcdef",
  "lastName": "Chen",
  "level": "member",
  "status": "sent",
  "updatedAt": "2024-03-15T10:00:00Z",
  "userId": "usr_1234567890abcdef1234567890abcdef",
  "invitedByApiKeyId": "550e8400-e29b-41d4-a716-446655440000",
  "middleName": "David",
  "phoneNumber": "5551234567",
  "suffix1": "MD",
  "suffix2": null
}