> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # UpdateStaffMember # Package: eventManagement # Namespace: StaffMemberManagement # Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/staff-members/update-staff-member.md ## Permission Scopes: Manage Events - all permissions: SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS ## Introduction Updates a staff member. Each time the staff member is updated, `revision` increments by 1. The current `revision` must be specified when updating the staff member. This ensures you're working with the latest version of the staff member and prevents unintended overwrites. --- ## REST API ### Schema ``` Method: updateStaffMember Description: Updates a staff member. Each time the staff member is updated, `revision` increments by 1. The current `revision` must be specified when updating the staff member. This ensures you're working with the latest version of the staff member and prevents unintended overwrites. URL: https://www.wixapis.com/events/v1/staff-members/{staffMember.id} Method: PATCH # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: staffMember, staffMember.id, staffMember.revision Method parameters: param name: staffMember | type: StaffMember | description: A Staff Member represents a person with predefined responsibilities for operating events. You can set each staff member's permissions and assign them to some or all events on a site. Upon creation, Wix automatically generates a login link for the staff member to the Check-in app, where they can perform their roles without interacting with the site itself. Learn more about [Check-in](https://support.wix.com/en/article/check-in-by-wix-an-overview). | required: true - ONE-OF: - required: true - name: allEvents | type: AllEvents | description: Generate link for all events on a site. If a staff member is assigned to all events on a Wix site, they're automatically assigned to every new event too. EMPTY-OBJECT {} - name: specificEvents | type: SpecificEvents | description: Generate link for the specified events. - name: events | type: array | description: List of events for which staff members have access. - name: id | type: string | description: Staff member GUID. | required: true - name: revision | type: string | description: Revision number, which increments by 1 each time the staff member is updated. To prevent conflicting changes, the existing `revision` must be used when updating a staff member. | required: true - name: name | type: string | description: Staff member name. - name: status | type: Status | description: Staff member status. To change the status, call Update Staff Member. - enum: - PENDING: The staff member hasn't logged in yet. - HAS_ACCESS: The staff member is logged in and has access to an event. - ACCESS_PAUSED: The access to an event is paused for the staff member. - name: extendedFields | type: ExtendedFields | description: Data extensions. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: permissions | type: array | description: Staff member permissions. - enum: - CHECK_IN_GUESTS: The staff member can view the guest list, check in guests, and scan tickets. - SELL_TICKETS: The staff member can sell tickets. - ADD_GUESTS: The staff member can add guests to the event manually and mark their payment status. - READ_ANALYTICS: The staff member can track tickets sales, site visits, and trends. - READ_GUEST_FORM: The staff member can see the guest's form answers. Return type: UpdateStaffMemberResponse - name: staffMember | type: StaffMember | description: Updated staff member. - ONE-OF: - name: allEvents | type: AllEvents | description: Generate link for all events on a site. If a staff member is assigned to all events on a Wix site, they're automatically assigned to every new event too. EMPTY-OBJECT {} - name: specificEvents | type: SpecificEvents | description: Generate link for the specified events. - name: events | type: array | description: List of events for which staff members have access. - name: id | type: string | description: Staff member GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the staff member is updated. To prevent conflicting changes, the existing `revision` must be used when updating a staff member. - name: createdDate | type: string | description: Date and time the staff member was created. - name: updatedDate | type: string | description: Date and time the staff member was updated. - name: name | type: string | description: Staff member name. - name: status | type: Status | description: Staff member status. To change the status, call Update Staff Member. - enum: - PENDING: The staff member hasn't logged in yet. - HAS_ACCESS: The staff member is logged in and has access to an event. - ACCESS_PAUSED: The access to an event is paused for the staff member. - name: extendedFields | type: ExtendedFields | description: Data extensions. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: permissions | type: array | description: Staff member permissions. - enum: - CHECK_IN_GUESTS: The staff member can view the guest list, check in guests, and scan tickets. - SELL_TICKETS: The staff member can sell tickets. - ADD_GUESTS: The staff member can add guests to the event manually and mark their payment status. - READ_ANALYTICS: The staff member can track tickets sales, site visits, and trends. - READ_GUEST_FORM: The staff member can see the guest's form answers. - name: loginLink | type: string | description: Login link generated for the staff member. This link opens up the [Check-in](https://support.wix.com/en/article/check-in-by-wix-an-overview) app. ``` ### Examples ### Update staff member ```curl curl -X PATCH 'https://www.wixapis.com/events/v1/staff-members/7ecacdb4-a6b6-4b83-89c8-171d26b14666' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d '{ "fieldMask": { "paths": [ "permissions" ] }, "staffMember": { "id": "7ecacdb4-a6b6-4b83-89c8-171d26b14666", "revision": "1", "name": "Jane Doe", "status": "HAS_ACCESS", "permissions": [ "ADD_GUESTS", "CHECK_IN_GUESTS" ], "allEvents": {} } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.eventManagement.StaffMemberManagement.updateStaffMember(_id, staffMember) Description: Updates a staff member. Each time the staff member is updated, `revision` increments by 1. The current `revision` must be specified when updating the staff member. This ensures you're working with the latest version of the staff member and prevents unintended overwrites. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: staffMember, _id, staffMember.revision Method parameters: param name: _id | type: string | description: Staff member GUID. | required: true param name: staffMember | type: UpdateStaffMember | description: A Staff Member represents a person with predefined responsibilities for operating events. You can set each staff member's permissions and assign them to some or all events on a site. Upon creation, Wix automatically generates a login link for the staff member to the Check-in app, where they can perform their roles without interacting with the site itself. Learn more about [Check-in](https://support.wix.com/en/article/check-in-by-wix-an-overview). | required: true - name: specificEvents | type: SpecificEvents | description: Generate link for the specified events. - name: events | type: array | description: List of events for which staff members have access. - name: revision | type: string | description: Revision number, which increments by 1 each time the staff member is updated. To prevent conflicting changes, the existing `revision` must be used when updating a staff member. | required: true - name: name | type: string | description: Staff member name. - name: status | type: Status | description: Staff member status. To change the status, call Update Staff Member. - enum: - PENDING: The staff member hasn't logged in yet. - HAS_ACCESS: The staff member is logged in and has access to an event. - ACCESS_PAUSED: The access to an event is paused for the staff member. - name: extendedFields | type: ExtendedFields | description: Data extensions. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: permissions | type: array | description: Staff member permissions. - enum: - CHECK_IN_GUESTS: The staff member can view the guest list, check in guests, and scan tickets. - SELL_TICKETS: The staff member can sell tickets. - ADD_GUESTS: The staff member can add guests to the event manually and mark their payment status. - READ_ANALYTICS: The staff member can track tickets sales, site visits, and trends. - READ_GUEST_FORM: The staff member can see the guest's form answers. Return type: PROMISE - ONE-OF: - name: specificEvents | type: SpecificEvents | description: Generate link for the specified events. - name: events | type: array | description: List of events for which staff members have access. - name: _id | type: string | description: Staff member GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the staff member is updated. To prevent conflicting changes, the existing `revision` must be used when updating a staff member. - name: _createdDate | type: Date | description: Date and time the staff member was created. - name: _updatedDate | type: Date | description: Date and time the staff member was updated. - name: name | type: string | description: Staff member name. - name: status | type: Status | description: Staff member status. To change the status, call Update Staff Member. - enum: - PENDING: The staff member hasn't logged in yet. - HAS_ACCESS: The staff member is logged in and has access to an event. - ACCESS_PAUSED: The access to an event is paused for the staff member. - name: extendedFields | type: ExtendedFields | description: Data extensions. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: permissions | type: array | description: Staff member permissions. - enum: - CHECK_IN_GUESTS: The staff member can view the guest list, check in guests, and scan tickets. - SELL_TICKETS: The staff member can sell tickets. - ADD_GUESTS: The staff member can add guests to the event manually and mark their payment status. - READ_ANALYTICS: The staff member can track tickets sales, site visits, and trends. - READ_GUEST_FORM: The staff member can see the guest's form answers. - name: loginLink | type: string | description: Login link generated for the staff member. This link opens up the [Check-in](https://support.wix.com/en/article/check-in-by-wix-an-overview) app. ``` ### Examples ### updateStaffMember ```javascript import { staffMembers } from '@wix/events'; async function updateStaffMember(_id,staffMember) { const response = await staffMembers.updateStaffMember(_id,staffMember); }; ``` ### updateStaffMember (with elevated permissions) ```javascript import { staffMembers } from '@wix/events'; import { auth } from '@wix/essentials'; async function myUpdateStaffMemberMethod(_id,staffMember) { const elevatedUpdateStaffMember = auth.elevate(staffMembers.updateStaffMember); const response = await elevatedUpdateStaffMember(_id,staffMember); } ``` ### updateStaffMember (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { staffMembers } from '@wix/events'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { staffMembers }, // Include the auth strategy and host as relevant }); async function updateStaffMember(_id,staffMember) { const response = await myWixClient.staffMembers.updateStaffMember(_id,staffMember); }; ``` ---