> 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

# BulkCancelEventsByFilter

# Package: eventManagement

# Namespace: EventManagement

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/bulk-cancel-events-by-filter.md

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

## Introduction

Cancels multiple events that meet the specified criteria. <br> <br>
After cancellation, registration for an event is closed. To reuse the event, call Clone Event and Publish Event to publish it again. <br> <br>
If event cancellation notifications are enabled, canceling an event automatically triggers the sending of cancellation emails and/or push notifications to registered guests.

---

## REST API

### Schema

```
 Method: bulkCancelEventsByFilter
 Description: Cancels multiple events that meet the specified criteria. <br> <br> After cancellation, registration for an event is closed. To reuse the event, call Clone Event and Publish Event to publish it again. <br> <br> If event cancellation notifications are enabled, canceling an event automatically triggers the sending of cancellation emails and/or push notifications to registered guests.
 URL: https://www.wixapis.com/events/v3/bulk/events/cancel-by-filter
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  filter.filter
 Method parameters: 
   param name: filter | type: QueryV2    
     - name: paging | type: Paging | description: Paging options. Only offset paging is supported; `cursorPaging` isn't available.  
        - name: limit | type: integer | description: Number of items to return. See [Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging#getting-started_sorting-and-paging_paging) for more information.  | validation: minimum 0, maximum 1000, format int32
        - name: offset | type: integer | description: Number of items to skip in the current sort order.  | validation: minimum 0, format int32
        - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` | required: true 
        - name: sort | type: array<Sorting> | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`  | validation: maxItems 20
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 100
           - name: order | type: SortOrder | description: Sort order. Use `ASC` for ascending order or `DESC` for descending order.  Default: `ASC`.  
                 - enum: ASC, DESC
 Return type: BulkCancelEventsByFilterResponse
  EMPTY-OBJECT {}


```

### Examples

### Bulk cancel events by category ID
```curl
curl -X POST 'https://www.wixapis.com/events/v3/bulk/events/cancel-by-filter' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH TOKEN>' \
-d '{
  "filter": {
    "filter": {
      "categoryId": "eebe3ed6-ffef-46e4-a83a-e883d7ad8fdd"
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.events.wixEventsV2.bulkCancelEventsByFilter(options)
 Description: Cancels multiple events that meet the specified criteria. <br> <br> After cancellation, registration for an event is closed. To reuse the event, call Clone Event and Publish Event to publish it again. <br> <br> If event cancellation notifications are enabled, canceling an event automatically triggers the sending of cancellation emails and/or push notifications to registered guests.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  options.filter.filter
 Method parameters: 
   param name: options | type: BulkCancelEventsByFilterOptions  none  
        - name: filter | type: QueryV2 | description: Filter. See [Query Events](https://dev.wix.com/docs/rest/business-solutions/events/events-v3/query-events.md) for a list of supported filters.  
           - ONE-OF: 
              - name: paging | type: Paging | description: Paging options. Only offset paging is supported; `cursorPaging` isn't available.  
                 - name: limit | type: integer | description: Number of items to return. See [Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging#getting-started_sorting-and-paging_paging) for more information.  | validation: minimum 0, maximum 1000, format int32
                 - name: offset | type: integer | description: Number of items to skip in the current sort order.  | validation: minimum 0, format int32
           - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` | required: true 
           - name: sort | type: array<Sorting> | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`  | validation: maxItems 20
              - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 100
              - name: order | type: SortOrder | description: Sort order. Use `ASC` for ascending order or `DESC` for descending order.  Default: `ASC`.  
                     - enum: ASC, DESC
 Return type: PROMISE<BulkCancelEventsByFilterResponse>
  EMPTY-OBJECT {}


```

### Examples

### bulkCancelEventsByFilter
```javascript
import { wixEventsV2 } from '@wix/events';

async function bulkCancelEventsByFilter(options) {
  const response = await wixEventsV2.bulkCancelEventsByFilter(options);
};
```

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

async function myBulkCancelEventsByFilterMethod(options) {
  const elevatedBulkCancelEventsByFilter = auth.elevate(wixEventsV2.bulkCancelEventsByFilter);
  const response = await elevatedBulkCancelEventsByFilter(options);
}
```

### bulkCancelEventsByFilter (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 { wixEventsV2 } from '@wix/events';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { wixEventsV2 },
  // Include the auth strategy and host as relevant
});


async function bulkCancelEventsByFilter(options) {
  const response = await myWixClient.wixEventsV2.bulkCancelEventsByFilter(options);
};
```

---