# Users ## Invite `client.viewer.users.invite(UserInviteParamsbody, RequestOptionsoptions?): UserInviteResponse` **post** `/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 - `body: UserInviteParams` - `canManageStudies: boolean` - `clinicRole: "Radiologist" | "Cardiologist" | "Neurologist" | 18 more` User's clinical or organizational role - `"Radiologist"` - `"Cardiologist"` - `"Neurologist"` - `"Urologist"` - `"Gynecologist"` - `"Endocrinologist"` - `"Doctor"` - `"Surgeon"` - `"Physician"` - `"Physician Assistant"` - `"Nurse Practitioner"` - `"Registered Nurse"` - `"Patient Care Coordinator"` - `"Front Desk Operator"` - `"Imaging Technologist"` - `"PACS Administrator"` - `"Software Engineer"` - `"Revenue Cycle Manager"` - `"Administrative Director"` - `"Administrative Assistant"` - `"Other"` - `email: string` User's email address for login and notifications - `firstName: string` User's first name - `hasDashboardAccess: boolean` - `lastName: string` User's last name - `level: "admin" | "member"` - `"admin"` - `"member"` - `middleName?: string` User's middle name (optional) - `phoneNumber?: string` User's phone number (10-15 digits, optional) - `suffix1?: string` Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional - `suffix2?: string` Additional name suffix (optional) ### Returns - `UserInviteResponse` Response for inviting a user to Viewer. Level is restricted to admin/member since owners cannot be invited via API. - `canManageStudies: boolean` Whether the user has permission to create, update, and manage studies - `clinicRole: "Radiologist" | "Cardiologist" | "Neurologist" | 18 more` User's clinical or organizational role - `"Radiologist"` - `"Cardiologist"` - `"Neurologist"` - `"Urologist"` - `"Gynecologist"` - `"Endocrinologist"` - `"Doctor"` - `"Surgeon"` - `"Physician"` - `"Physician Assistant"` - `"Nurse Practitioner"` - `"Registered Nurse"` - `"Patient Care Coordinator"` - `"Front Desk Operator"` - `"Imaging Technologist"` - `"PACS Administrator"` - `"Software Engineer"` - `"Revenue Cycle Manager"` - `"Administrative Director"` - `"Administrative Assistant"` - `"Other"` - `createdAt: string | null` Timestamp when the user was created - `email: string` User's email address for login and notifications - `firstName: string` User's first name - `hasDashboardAccess: boolean` Whether the user can access the dashboard interface. Required for admin users - `invitedSource: "dashboard" | "api"` How the user was invited - via dashboard UI or API - `"dashboard"` - `"api"` - `lastLoginAt: string | null` Timestamp of user's last login, null if never logged in - `lastName: string` User's last name - `level: "admin" | "member"` User access level. 'admin' can manage users/settings, 'member' has standard access - `"admin"` - `"member"` - `userId: string` Unique user identifier. Format: usr_{32-hex-chars} - `middleName?: string` User's middle name (optional) - `phoneNumber?: string` User's phone number (10-15 digits, optional) - `suffix1?: string` Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional - `suffix2?: string` Additional name suffix (optional) ### Example ```typescript import Avara from 'avara'; const client = new Avara({ apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted }); const response = await client.viewer.users.invite({ canManageStudies: true, clinicRole: 'Radiologist', email: 'dr.johnson@hospital.org', firstName: 'Sarah', hasDashboardAccess: true, lastName: 'Johnson', level: 'member', }); console.log(response.middleName); ``` ## List `client.viewer.users.list(UserListParamsquery?, RequestOptionsoptions?): CursorUsers` **get** `/v1/viewer/users` Retrieves a paginated list of users with optional filtering by access level, email, name, and invitation source. Returns up to 100 users per request. ### Parameters - `query: UserListParams` - `cursor?: string` Base64 encoded cursor from previous response - `email?: string` Filter by exact email match - `firstName?: string` Filter by first name (contains match) - `invitedSource?: "dashboard" | "api"` Filter by invitation source - `"dashboard"` - `"api"` - `lastName?: string` Filter by last name (contains match) - `level?: "owner" | "admin" | "member"` Filter by user level - `"owner"` - `"admin"` - `"member"` - `limit?: number` Number of results to return (1-100) ### Returns - `UserListResponse` A user in the Viewer system with study management permissions - `canManageStudies: boolean` Whether the user has permission to create, update, and manage studies - `clinicRole: "Radiologist" | "Cardiologist" | "Neurologist" | 18 more` User's clinical or organizational role - `"Radiologist"` - `"Cardiologist"` - `"Neurologist"` - `"Urologist"` - `"Gynecologist"` - `"Endocrinologist"` - `"Doctor"` - `"Surgeon"` - `"Physician"` - `"Physician Assistant"` - `"Nurse Practitioner"` - `"Registered Nurse"` - `"Patient Care Coordinator"` - `"Front Desk Operator"` - `"Imaging Technologist"` - `"PACS Administrator"` - `"Software Engineer"` - `"Revenue Cycle Manager"` - `"Administrative Director"` - `"Administrative Assistant"` - `"Other"` - `createdAt: string | null` Timestamp when the user was created - `email: string` User's email address for login and notifications - `firstName: string` User's first name - `hasDashboardAccess: boolean` Whether the user can access the dashboard interface. Required for admin users - `invitedSource: "dashboard" | "api"` How the user was invited - via dashboard UI or API - `"dashboard"` - `"api"` - `lastLoginAt: string | null` Timestamp of user's last login, null if never logged in - `lastName: string` User's last name - `level: "owner" | "admin" | "member"` User access level. 'owner' has full control, 'admin' can manage users/settings, 'member' has standard access - `"owner"` - `"admin"` - `"member"` - `userId: string` Unique user identifier. Format: usr_{32-hex-chars} - `middleName?: string` User's middle name (optional) - `phoneNumber?: string` User's phone number (10-15 digits, optional) - `suffix1?: string` Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional - `suffix2?: string` Additional name suffix (optional) ### Example ```typescript import Avara from 'avara'; const client = new Avara({ apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const userListResponse of client.viewer.users.list()) { console.log(userListResponse.middleName); } ``` ## Retrieve `client.viewer.users.retrieve(stringuserID, RequestOptionsoptions?): UserRetrieveResponse` **get** `/v1/viewer/users/{userId}` Retrieves a single user by their unique user ID. Returns the complete user object with all profile information, permissions, and status. ### Parameters - `userID: string` Unique user identifier. Format: usr_{32-hex-chars} ### Returns - `UserRetrieveResponse` A user in the Viewer system with study management permissions - `canManageStudies: boolean` Whether the user has permission to create, update, and manage studies - `clinicRole: "Radiologist" | "Cardiologist" | "Neurologist" | 18 more` User's clinical or organizational role - `"Radiologist"` - `"Cardiologist"` - `"Neurologist"` - `"Urologist"` - `"Gynecologist"` - `"Endocrinologist"` - `"Doctor"` - `"Surgeon"` - `"Physician"` - `"Physician Assistant"` - `"Nurse Practitioner"` - `"Registered Nurse"` - `"Patient Care Coordinator"` - `"Front Desk Operator"` - `"Imaging Technologist"` - `"PACS Administrator"` - `"Software Engineer"` - `"Revenue Cycle Manager"` - `"Administrative Director"` - `"Administrative Assistant"` - `"Other"` - `createdAt: string | null` Timestamp when the user was created - `email: string` User's email address for login and notifications - `firstName: string` User's first name - `hasDashboardAccess: boolean` Whether the user can access the dashboard interface. Required for admin users - `invitedSource: "dashboard" | "api"` How the user was invited - via dashboard UI or API - `"dashboard"` - `"api"` - `lastLoginAt: string | null` Timestamp of user's last login, null if never logged in - `lastName: string` User's last name - `level: "owner" | "admin" | "member"` User access level. 'owner' has full control, 'admin' can manage users/settings, 'member' has standard access - `"owner"` - `"admin"` - `"member"` - `userId: string` Unique user identifier. Format: usr_{32-hex-chars} - `middleName?: string` User's middle name (optional) - `phoneNumber?: string` User's phone number (10-15 digits, optional) - `suffix1?: string` Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional - `suffix2?: string` Additional name suffix (optional) ### Example ```typescript import Avara from 'avara'; const client = new Avara({ apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted }); const user = await client.viewer.users.retrieve('usr_1234567890abcdef1234567890abcdef'); console.log(user.middleName); ``` ## Update `client.viewer.users.update(stringuserID, UserUpdateParamsbody?, RequestOptionsoptions?): UserUpdateResponse` **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. ### Parameters - `userID: string` Unique user identifier. Format: usr_{32-hex-chars} - `body: UserUpdateParams` - `canManageStudies?: boolean` - `clinicRole?: "Radiologist" | "Cardiologist" | "Neurologist" | 18 more | null` - `"Radiologist"` - `"Cardiologist"` - `"Neurologist"` - `"Urologist"` - `"Gynecologist"` - `"Endocrinologist"` - `"Doctor"` - `"Surgeon"` - `"Physician"` - `"Physician Assistant"` - `"Nurse Practitioner"` - `"Registered Nurse"` - `"Patient Care Coordinator"` - `"Front Desk Operator"` - `"Imaging Technologist"` - `"PACS Administrator"` - `"Software Engineer"` - `"Revenue Cycle Manager"` - `"Administrative Director"` - `"Administrative Assistant"` - `"Other"` - `firstName?: string` User's first name - `hasDashboardAccess?: boolean` Whether the user can access the dashboard interface. Required for admin users - `lastName?: string` User's last name - `level?: "admin" | "member"` - `"admin"` - `"member"` - `middleName?: string | null` - `phoneNumber?: string | null` - `suffix1?: string | null` - `suffix2?: string | null` ### Returns - `UserUpdateResponse` A user in the Viewer system with study management permissions - `canManageStudies: boolean` Whether the user has permission to create, update, and manage studies - `clinicRole: "Radiologist" | "Cardiologist" | "Neurologist" | 18 more` User's clinical or organizational role - `"Radiologist"` - `"Cardiologist"` - `"Neurologist"` - `"Urologist"` - `"Gynecologist"` - `"Endocrinologist"` - `"Doctor"` - `"Surgeon"` - `"Physician"` - `"Physician Assistant"` - `"Nurse Practitioner"` - `"Registered Nurse"` - `"Patient Care Coordinator"` - `"Front Desk Operator"` - `"Imaging Technologist"` - `"PACS Administrator"` - `"Software Engineer"` - `"Revenue Cycle Manager"` - `"Administrative Director"` - `"Administrative Assistant"` - `"Other"` - `createdAt: string | null` Timestamp when the user was created - `email: string` User's email address for login and notifications - `firstName: string` User's first name - `hasDashboardAccess: boolean` Whether the user can access the dashboard interface. Required for admin users - `invitedSource: "dashboard" | "api"` How the user was invited - via dashboard UI or API - `"dashboard"` - `"api"` - `lastLoginAt: string | null` Timestamp of user's last login, null if never logged in - `lastName: string` User's last name - `level: "owner" | "admin" | "member"` User access level. 'owner' has full control, 'admin' can manage users/settings, 'member' has standard access - `"owner"` - `"admin"` - `"member"` - `userId: string` Unique user identifier. Format: usr_{32-hex-chars} - `middleName?: string` User's middle name (optional) - `phoneNumber?: string` User's phone number (10-15 digits, optional) - `suffix1?: string` Name suffix (e.g., 'Jr.', 'Sr.', 'III') - optional - `suffix2?: string` Additional name suffix (optional) ### Example ```typescript import Avara from 'avara'; const client = new Avara({ apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted }); const user = await client.viewer.users.update('usr_1234567890abcdef1234567890abcdef'); console.log(user.middleName); ``` ## Revoke Access `client.viewer.users.revokeAccess(UserRevokeAccessParamsbody, RequestOptionsoptions?): UserRevokeAccessResponse` **post** `/v1/viewer/users/revoke-access` Deactivates a user's access to the system. The user will no longer be able to log in or access resources. User data is preserved and can be reactivated later. ### Parameters - `body: UserRevokeAccessParams` - `userId: string` User ID to revoke access for. Format: usr_{32-hex-chars} ### Returns - `UserRevokeAccessResponse` Response for revoking user access in Viewer - `success: boolean` - `message?: string` ### Example ```typescript import Avara from 'avara'; const client = new Avara({ apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted }); const response = await client.viewer.users.revokeAccess({ userId: 'usr_1234567890abcdef1234567890abcdef', }); console.log(response.success); ``` ## Reactivate `client.viewer.users.reactivate(UserReactivateParamsbody, RequestOptionsoptions?): UserReactivateResponse` **post** `/v1/viewer/users/reactivate` Restores access for a previously deactivated user. The user will regain their original permissions and be able to log in again. ### Parameters - `body: UserReactivateParams` - `userId: string` User ID to reactivate. Format: usr_{32-hex-chars} ### Returns - `UserReactivateResponse` Response for reactivating a user in Viewer - `success: boolean` - `message?: string` ### Example ```typescript import Avara from 'avara'; const client = new Avara({ apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted }); const response = await client.viewer.users.reactivate({ userId: 'usr_1234567890abcdef1234567890abcdef', }); console.log(response.success); ``` # Invitations ## List `client.viewer.users.invitations.list(InvitationListParamsquery?, RequestOptionsoptions?): CursorInvitations` **get** `/v1/viewer/users/invitations` Retrieves a paginated list of user invitations with optional filtering by status, expiration, date range, and user ID. Returns up to 100 invitations per request. ### Parameters - `query: InvitationListParams` - `cursor?: string` Base64 encoded cursor from previous response - `endDate?: string` Filter invitations created on or before this date (YYYY-MM-DD) - `expired?: "all" | "expired" | "not-expired"` Filter by expiration status - `"all"` - `"expired"` - `"not-expired"` - `limit?: number` Number of results to return (1-100) - `startDate?: string` Filter invitations created on or after this date (YYYY-MM-DD) - `status?: Array<"sent" | "accepted" | "rejected" | "revoked">` Filter by invitation status(es) - `"sent"` - `"accepted"` - `"rejected"` - `"revoked"` - `userId?: string` Filter by user ID. Format: usr_{32-hex-chars} ### Returns - `InvitationListResponse` A pending user invitation in the Viewer system - `canManageStudies: boolean` Whether the invited user will have permission to manage studies - `clinicId: string` UUID of the clinic this invitation belongs to - `clinicRole: "Radiologist" | "Cardiologist" | "Neurologist" | 18 more` Clinical or organizational role for the invited user - `"Radiologist"` - `"Cardiologist"` - `"Neurologist"` - `"Urologist"` - `"Gynecologist"` - `"Endocrinologist"` - `"Doctor"` - `"Surgeon"` - `"Physician"` - `"Physician Assistant"` - `"Nurse Practitioner"` - `"Registered Nurse"` - `"Patient Care Coordinator"` - `"Front Desk Operator"` - `"Imaging Technologist"` - `"PACS Administrator"` - `"Software Engineer"` - `"Revenue Cycle Manager"` - `"Administrative Director"` - `"Administrative Assistant"` - `"Other"` - `createdAt: string | null` Timestamp when the invitation was created - `email: string` Email address the invitation was sent to - `expiry: string | null` When the invitation expires, null if no expiration - `firstName: string` Invited user's first name - `hasDashboardAccess: boolean` Whether the invited user will have dashboard access - `invitationId: string` Unique invitation identifier. Format: inv_{32-hex-chars} - `invitedSource: "dashboard" | "api"` How the invitation was created - 'dashboard' or 'api' - `"dashboard"` - `"api"` - `inviterId: string` User ID of the person who sent the invitation. Format: usr_{32-hex-chars}. Null if invited via API - `lastName: string` Invited user's last name - `level: "owner" | "admin" | "member"` Access level for the invited user. 'admin' or 'member' when created via API - `"owner"` - `"admin"` - `"member"` - `status: "sent" | "accepted" | "rejected" | "revoked"` Invitation status: 'sent', 'accepted', 'rejected', or 'revoked' - `"sent"` - `"accepted"` - `"rejected"` - `"revoked"` - `updatedAt: string | null` Timestamp when the invitation was last updated - `userId: string` 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 - `invitedByApiKeyId?: string` UUID of the API key used to send this invitation. Null if sent via dashboard - `middleName?: string | null` Invited user's middle name (optional) - `phoneNumber?: string | null` Invited user's phone number (optional) - `suffix1?: string | null` Name suffix (e.g., 'Jr.', 'MD') - optional - `suffix2?: string | null` Additional name suffix - optional ### Example ```typescript import Avara from 'avara'; const client = new Avara({ apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const invitationListResponse of client.viewer.users.invitations.list()) { console.log(invitationListResponse.middleName); } ``` ## Retrieve `client.viewer.users.invitations.retrieve(stringinvitationID, RequestOptionsoptions?): InvitationRetrieveResponse` **get** `/v1/viewer/users/invitations/{invitationId}` Retrieves a single invitation by its unique invitation ID. Returns the complete invitation details including status, expiration, and associated user information. ### Parameters - `invitationID: string` Unique invitation identifier. Format: inv_{32-hex-chars} ### Returns - `InvitationRetrieveResponse` A pending user invitation in the Viewer system - `canManageStudies: boolean` Whether the invited user will have permission to manage studies - `clinicId: string` UUID of the clinic this invitation belongs to - `clinicRole: "Radiologist" | "Cardiologist" | "Neurologist" | 18 more` Clinical or organizational role for the invited user - `"Radiologist"` - `"Cardiologist"` - `"Neurologist"` - `"Urologist"` - `"Gynecologist"` - `"Endocrinologist"` - `"Doctor"` - `"Surgeon"` - `"Physician"` - `"Physician Assistant"` - `"Nurse Practitioner"` - `"Registered Nurse"` - `"Patient Care Coordinator"` - `"Front Desk Operator"` - `"Imaging Technologist"` - `"PACS Administrator"` - `"Software Engineer"` - `"Revenue Cycle Manager"` - `"Administrative Director"` - `"Administrative Assistant"` - `"Other"` - `createdAt: string | null` Timestamp when the invitation was created - `email: string` Email address the invitation was sent to - `expiry: string | null` When the invitation expires, null if no expiration - `firstName: string` Invited user's first name - `hasDashboardAccess: boolean` Whether the invited user will have dashboard access - `invitationId: string` Unique invitation identifier. Format: inv_{32-hex-chars} - `invitedSource: "dashboard" | "api"` How the invitation was created - 'dashboard' or 'api' - `"dashboard"` - `"api"` - `inviterId: string` User ID of the person who sent the invitation. Format: usr_{32-hex-chars}. Null if invited via API - `lastName: string` Invited user's last name - `level: "owner" | "admin" | "member"` Access level for the invited user. 'admin' or 'member' when created via API - `"owner"` - `"admin"` - `"member"` - `status: "sent" | "accepted" | "rejected" | "revoked"` Invitation status: 'sent', 'accepted', 'rejected', or 'revoked' - `"sent"` - `"accepted"` - `"rejected"` - `"revoked"` - `updatedAt: string | null` Timestamp when the invitation was last updated - `userId: string` 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 - `invitedByApiKeyId?: string` UUID of the API key used to send this invitation. Null if sent via dashboard - `middleName?: string | null` Invited user's middle name (optional) - `phoneNumber?: string | null` Invited user's phone number (optional) - `suffix1?: string | null` Name suffix (e.g., 'Jr.', 'MD') - optional - `suffix2?: string | null` Additional name suffix - optional ### Example ```typescript import Avara from 'avara'; const client = new Avara({ apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted }); const invitation = await client.viewer.users.invitations.retrieve( 'inv_1234567890abcdef1234567890abcdef', ); console.log(invitation.middleName); ``` ## Update `client.viewer.users.invitations.update(stringinvitationID, InvitationUpdateParamsbody?, RequestOptionsoptions?): InvitationUpdateResponse` **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. ### Parameters - `invitationID: string` Unique invitation identifier. Format: inv_{32-hex-chars} - `body: InvitationUpdateParams` - `canManageStudies?: boolean` - `clinicRole?: "Radiologist" | "Cardiologist" | "Neurologist" | 18 more | null` - `"Radiologist"` - `"Cardiologist"` - `"Neurologist"` - `"Urologist"` - `"Gynecologist"` - `"Endocrinologist"` - `"Doctor"` - `"Surgeon"` - `"Physician"` - `"Physician Assistant"` - `"Nurse Practitioner"` - `"Registered Nurse"` - `"Patient Care Coordinator"` - `"Front Desk Operator"` - `"Imaging Technologist"` - `"PACS Administrator"` - `"Software Engineer"` - `"Revenue Cycle Manager"` - `"Administrative Director"` - `"Administrative Assistant"` - `"Other"` - `firstName?: string` Invited user's first name - `hasDashboardAccess?: boolean` Whether the invited user will have dashboard access - `lastName?: string` Invited user's last name - `level?: "admin" | "member"` - `"admin"` - `"member"` - `middleName?: string | null` - `phoneNumber?: string | null` - `suffix1?: string | null` - `suffix2?: string | null` ### Returns - `InvitationUpdateResponse` A pending user invitation in the Viewer system - `canManageStudies: boolean` Whether the invited user will have permission to manage studies - `clinicId: string` UUID of the clinic this invitation belongs to - `clinicRole: "Radiologist" | "Cardiologist" | "Neurologist" | 18 more` Clinical or organizational role for the invited user - `"Radiologist"` - `"Cardiologist"` - `"Neurologist"` - `"Urologist"` - `"Gynecologist"` - `"Endocrinologist"` - `"Doctor"` - `"Surgeon"` - `"Physician"` - `"Physician Assistant"` - `"Nurse Practitioner"` - `"Registered Nurse"` - `"Patient Care Coordinator"` - `"Front Desk Operator"` - `"Imaging Technologist"` - `"PACS Administrator"` - `"Software Engineer"` - `"Revenue Cycle Manager"` - `"Administrative Director"` - `"Administrative Assistant"` - `"Other"` - `createdAt: string | null` Timestamp when the invitation was created - `email: string` Email address the invitation was sent to - `expiry: string | null` When the invitation expires, null if no expiration - `firstName: string` Invited user's first name - `hasDashboardAccess: boolean` Whether the invited user will have dashboard access - `invitationId: string` Unique invitation identifier. Format: inv_{32-hex-chars} - `invitedSource: "dashboard" | "api"` How the invitation was created - 'dashboard' or 'api' - `"dashboard"` - `"api"` - `inviterId: string` User ID of the person who sent the invitation. Format: usr_{32-hex-chars}. Null if invited via API - `lastName: string` Invited user's last name - `level: "owner" | "admin" | "member"` Access level for the invited user. 'admin' or 'member' when created via API - `"owner"` - `"admin"` - `"member"` - `status: "sent" | "accepted" | "rejected" | "revoked"` Invitation status: 'sent', 'accepted', 'rejected', or 'revoked' - `"sent"` - `"accepted"` - `"rejected"` - `"revoked"` - `updatedAt: string | null` Timestamp when the invitation was last updated - `userId: string` 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 - `invitedByApiKeyId?: string` UUID of the API key used to send this invitation. Null if sent via dashboard - `middleName?: string | null` Invited user's middle name (optional) - `phoneNumber?: string | null` Invited user's phone number (optional) - `suffix1?: string | null` Name suffix (e.g., 'Jr.', 'MD') - optional - `suffix2?: string | null` Additional name suffix - optional ### Example ```typescript import Avara from 'avara'; const client = new Avara({ apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted }); const invitation = await client.viewer.users.invitations.update( 'inv_1234567890abcdef1234567890abcdef', ); console.log(invitation.middleName); ``` ## Revoke `client.viewer.users.invitations.revoke(InvitationRevokeParamsbody?, RequestOptionsoptions?): InvitationRevokeResponse` **post** `/v1/viewer/users/invitations/revoke` Revokes a pending invitation, preventing it from being accepted. Can revoke by invitation ID, user ID, or both. Useful for cancelling invitations sent in error. ### Parameters - `body: InvitationRevokeParams` - `invitationId?: string` Invitation ID to revoke. Format: inv_{32-hex-chars} - `userId?: string` User ID whose pending invitation to revoke. Format: usr_{32-hex-chars} ### Returns - `InvitationRevokeResponse` Response for revoking an invitation in Viewer - `success: boolean` - `message?: string` ### Example ```typescript import Avara from 'avara'; const client = new Avara({ apiKey: process.env['AVARA_API_KEY'], // This is the default and can be omitted }); const response = await client.viewer.users.invitations.revoke(); console.log(response.success); ```