> 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

# BulkUpdateDonationCampaignTags

# Package: donations

# Namespace: DonationCampaignService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/donations/donation-campaigns/bulk-update-donation-campaign-tags.md

## Permission Scopes:
Manage Donation Campaigns: SCOPE.DONATIONS.MANAGE-CAMPAIGNS

## Introduction

Updates tags on multiple donation campaigns by ID.

Use this method to assign or remove tags from specific campaigns.
A tag that appears in both assign and unassign lists will be assigned.

---

## REST API

### Schema

```
 Method: bulkUpdateDonationCampaignTags
 Description: Updates tags on multiple donation campaigns by GUID.  Use this method to assign or remove tags from specific campaigns. A tag that appears in both assign and unassign lists will be assigned.
 URL: https://www.wixapis.com/donation-campaigns/v2/bulk/donation-campaigns/update-tags
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  ids
 Method parameters: 
   param name: assignTags | type: Tags | description: Common object for tags. Should be use as in this example: message Foo { option (.wix.api.decomposite_of) = "wix.commons.v2.tags.Foo"; string id = 1; ... Tags tags = 5 }  example of taggable entity { id: "123" tags: { public_tags: { tag_ids:["11","22"] }, private_tags: { tag_ids: ["33", "44"] } } }  
        - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.  
           - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
        - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  
   param name: ids | type: array<ids> | description: Donation campaign GUIDs. | required: true | validation: minItems 1, maxItems 100, format GUID
   param name: unassignTags | type: Tags | description: Common object for tags. Should be use as in this example: message Foo { option (.wix.api.decomposite_of) = "wix.commons.v2.tags.Foo"; string id = 1; ... Tags tags = 5 }  example of taggable entity { id: "123" tags: { public_tags: { tag_ids:["11","22"] }, private_tags: { tag_ids: ["33", "44"] } } }  
        - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.  
        - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  
 Return type: BulkUpdateDonationCampaignTagsResponse
  - name: results | type: array<BulkUpdateDonationCampaignTagsResult> | description: Results of the tag update operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata about this specific tag update operation.  
        - name: id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  | validation: minimum 0
        - name: success | type: boolean | description: Whether the requested action for this item was successful. When `false`, the `error` field is returned.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk operation.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  | validation: minimum 0
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  | validation: minimum 0
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  | validation: minimum 0

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: EMPTY_ASSIGN_AND_UNASSIGN_LISTS | Description: No tags were specified to assign or unassign.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: SITE_CURRENCY_UNAVAILABLE | Description: Site currency settings are temporarily unavailable. Try again later.


```

### Examples

### Bulk Update Donation Campaign Tags
Updates tags of 2 donation campaigns in one request

```curl
curl -X POST \
  'https://www.wixapis.com/donation-campaigns/v2/bulk/donation-campaigns/update-tags' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
    "ids": [
      "87f8066e-f0e9-41da-b4ca-4bceb2ecdf31",
      "fb54c2ad-2f71-4c71-bd3c-60ab9f9ea29e"
    ],
    "assignTags": {
      "publicTags": {
        "tagIds": [
          "yg555",
          "p5627"
        ]
      }
    },
    "unassignTags": {
      "publicTags": {
        "tagIds": [
          "96gFf"
        ]
      }
    }
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.donations.donationCampaigns.bulkUpdateDonationCampaignTags(ids, options)
 Description: Updates tags on multiple donation campaigns by GUID.  Use this method to assign or remove tags from specific campaigns. A tag that appears in both assign and unassign lists will be assigned.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  ids
 Method parameters: 
   param name: ids | type: array<string> | description: Donation campaign GUIDs. | required: true | validation: minItems 1, maxItems 100, format GUID
   param name: options | type: BulkUpdateDonationCampaignTagsOptions  none  
        - name: assignTags | type: Tags | description: Tags to assign. If a tag already exists on a campaign, it remains assigned.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, typically restricted from site members and visitors.  
              - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
           - name: publicTags | type: TagList | description: Tags that are exposed to anyone with access to the entity, including site members and visitors.  
        - name: unassignTags | type: Tags | description: Tags to unassign. If a tag doesn't exist on a campaign, it's ignored.  
 Return type: PROMISE<BulkUpdateDonationCampaignTagsResponse>
  - name: results | type: array<BulkUpdateDonationCampaignTagsResult> | description: Results of the tag update operation.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata about this specific tag update operation.  
        - name: _id | type: string | description: Item GUID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  | validation: minimum 0
        - name: success | type: boolean | description: Whether the requested action for this item was successful. When `false`, the `error` field is returned.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata about the bulk operation.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  | validation: minimum 0
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  | validation: minimum 0
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  | validation: minimum 0

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: EMPTY_ASSIGN_AND_UNASSIGN_LISTS | Description: No tags were specified to assign or unassign.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: SITE_CURRENCY_UNAVAILABLE | Description: Site currency settings are temporarily unavailable. Try again later.


```

### Examples

### bulkUpdateDonationCampaignTags
```javascript
import { donationCampaigns } from '@wix/donations';

async function bulkUpdateDonationCampaignTags(ids,options) {
  const response = await donationCampaigns.bulkUpdateDonationCampaignTags(ids,options);
};
```

### bulkUpdateDonationCampaignTags (with elevated permissions)
```javascript
import { donationCampaigns } from '@wix/donations';
import { auth } from '@wix/essentials';

async function myBulkUpdateDonationCampaignTagsMethod(ids,options) {
  const elevatedBulkUpdateDonationCampaignTags = auth.elevate(donationCampaigns.bulkUpdateDonationCampaignTags);
  const response = await elevatedBulkUpdateDonationCampaignTags(ids,options);
}
```

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

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


async function bulkUpdateDonationCampaignTags(ids,options) {
  const response = await myWixClient.donationCampaigns.bulkUpdateDonationCampaignTags(ids,options);
};
```

---