Bulk Label And Unlabel Contacts

Download skill
Copy

Description

Adds and removes labels from multiple contacts using the Wix Contacts REST API.

Labels are added to and removed from all contacts that meet the specified filter and search criteria. The request should specify a filter value, a search value, or both. To perform a dry run, call Query Contacts with the intended filter options.

When this method is used, a bulk job is started and the job ID is returned. The job might not complete right away, depending on its size. The job's status can be retrieved with Get Bulk Job.

IMPORTANT NOTE: When specific contacts are to be labeled, they should be filtered by id.

API Endpoint

POST https://www.wixapis.com/contacts/v4/bulk/contacts/add-remove-labels

Request Example

Copy

Request Parameters

  • filter (object, optional): Filter criteria to identify contacts. When specific contacts are to be labeled, filter by id.
  • search (string, optional): Search query to identify contacts.
  • labelKeysToAdd (array of strings): Array of label keys to add to matching contacts.
  • labelKeysToRemove (array of strings): Array of label keys to remove from matching contacts.

Note: The request should specify a filter value, a search value, or both.

Response

The response includes a jobId which can be used to track the bulk job status:

Copy

Use the Get Bulk Job endpoint to check the job status.

Permissions Required

  • CONTACTS.MODIFY
Did this help?