> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# QueryStaffMembers

# Package: eventManagement

# Namespace: StaffMemberManagement

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/staff-members/query-staff-members?apiView=SDK.md

## Permission Scopes:
Manage Events - all permissions: SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS

## Introduction

Retrieves a list of staff members, with the specified paging, filtering, and sorting.
Query Staff Members runs with these defaults, which you can override:
- `createdDate` is sorted in `ASC` order
- `paging.limit` is `100`
- `paging.offset` is `0`

To learn about working with _Query_ methods, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/get-started/field-projection.md).

---

## REST API

### Schema

```
 Method: queryStaffMembers
 Description: Retrieves a list of staff members, with the specified paging, filtering, and sorting. Query Staff Members runs with these defaults, which you can override: - `createdDate` is sorted in `ASC` order - `paging.limit` is `100` - `paging.offset` is `0`  To learn about working with _Query_ methods, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/get-started/field-projection.md).
 URL: https://www.wixapis.com/events/v1/staff-members/query
 Method: POST
 Method parameters:
   param name: fieldsets | type: array<fieldsets> | description: A list of additional fields to include in the response.  | validation: maxItems 3
                 - enum:
                 -     LOGIN_LINK: Returns the `loginLink` field.
   param name: query | type: QueryV2    
     - name: cursorPaging | type: CursorPaging | description: Cursor paging options.  Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#cursor-paging).  
        - name: limit | type: integer | description: Number of items to load per page.  | validation: minimum 0, maximum 1000, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  
        - name: filter | type: object | description: Filter object.  Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-filter-section).  
        - name: sort | type: array<Sorting> | description: Sort object.  Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-sort-section).  
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 100
           - name: order | type: SortOrder | description: Sort order (ASC/DESC). Defaults to ASC  
                 - enum: ASC, DESC
        - name: fieldsets | type: array<string> | description: Predefined sets of fields to return.  
 Query fields:
   - field: id | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: createdDate | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: updatedDate | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: QueryStaffMembersResponse
  - name: staffMembers | type: array<StaffMember> | description: A list of staff members.  
     - 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<string> | description: List of events for which staff members have access.  | validation: maxItems 50, format GUID
     - name: id | type: string | description: Staff member GUID.  | read-only: true | validation: format 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.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the staff member was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the staff member was updated.  | read-only: true | validation: format date-time
     - name: name | type: string | description: Staff member name.  | validation: minLength 1, maxLength 120
     - 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).  | validation: format map
     - name: permissions | type: array<Permission> | description: Staff member permissions.  | validation: maxItems 4
         - 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.  | read-only: true | validation: format WEB_URL
  - name: pagingMetadata | type: PagingMetadataV2 | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  
     - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  


```

### Examples

### Query staff members
```curl
curl -X POST 'https://www.wixapis.com/events/v1/staff-members/query' \
-H 'Authorization: <AUTH TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
		"query": {
			"filter": {
				"createdDate": {
					"$gt": "2025-01-01T00:00:00.000Z"
				}
			}
		},
		"fieldsets": [
			"LOGIN_LINK"
		]
	}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.events.staffMembers.queryStaffMembers(query, options)
 Description: Retrieves a list of staff members, with the specified paging, filtering, and sorting. Query Staff Members runs with these defaults, which you can override: - `createdDate` is sorted in `ASC` order - `paging.limit` is `100` - `paging.offset` is `0`  To learn about working with _Query_ methods, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/get-started/field-projection.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: StaffMemberQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor paging options.  Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#cursor-paging).  
        - name: limit | type: integer | description: Number of items to load per page.  | validation: minimum 0, maximum 1000, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  
        - name: filter | type: object | description: Filter object.  Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-filter-section).  
        - name: sort | type: array<Sorting> | description: Sort object.  Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md#the-sort-section).  
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 100
           - name: order | type: SortOrder | description: Sort order (ASC/DESC). Defaults to ASC  
                 - enum: ASC, DESC
   param name: options | type: QueryStaffMembersOptions  none  
        - name: fieldsets | type: array<Fieldset> | description: A list of additional fields to include in the response.  | validation: maxItems 3
             - enum:
             -     LOGIN_LINK: Returns the `loginLink` field.
 Query fields:
   - field: _id | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _createdDate | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _updatedDate | operators: $eq, $ne, $lt, $lte, $gt, $gte, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryStaffMembersResponse>
  - name: staffMembers | type: array<StaffMember> | description: A list of staff members.  
     - ONE-OF: 
        - name: specificEvents | type: SpecificEvents | description: Generate link for the specified events.  
           - name: events | type: array<string> | description: List of events for which staff members have access.  | validation: maxItems 50, format GUID
     - name: _id | type: string | description: Staff member GUID.  | read-only: true | validation: format 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.  | read-only: true | validation: format int64
     - name: _createdDate | type: Date | description: Date and time the staff member was created.  | read-only: true 
     - name: _updatedDate | type: Date | description: Date and time the staff member was updated.  | read-only: true 
     - name: name | type: string | description: Staff member name.  | validation: minLength 1, maxLength 120
     - 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).  | validation: format map
     - name: permissions | type: array<Permission> | description: Staff member permissions.  | validation: maxItems 4
         - 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.  | read-only: true | validation: format WEB_URL
  - name: pagingMetadata | type: PagingMetadataV2 | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  
     - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  


```

### Examples

### queryStaffMembers
```javascript
import { staffMembers } from '@wix/events';

async function queryStaffMembers(query,options) {
  const response = await staffMembers.queryStaffMembers(query,options);
};
```

### queryStaffMembers (with elevated permissions)
```javascript
import { staffMembers } from '@wix/events';
import { auth } from '@wix/essentials';

async function myQueryStaffMembersMethod(query,options) {
  const elevatedQueryStaffMembers = auth.elevate(staffMembers.queryStaffMembers);
  const response = await elevatedQueryStaffMembers(query,options);
}
```

### queryStaffMembers (self-managed)
Self-managed 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 queryStaffMembers(query,options) {
  const response = await myWixClient.staffMembers.queryStaffMembers(query,options);
};
```

---