Adds and removes labels from multiple contacts using the Wix Contacts REST API.
If the user asks to create a label (for example, "Create VIP, Wholesale, and Newsletter labels"), use Find or Create Label directly. Creating a label definition does not require finding contacts or starting a bulk labeling job.
Use the returned label and its key; newLabel distinguishes a newly created label from an existing one. For several names, make one call per name and check each result. Stop here when the request is only to create labels: do not assign them to contacts.
If the user asks to label or unlabel contacts, resolve the requested label keys first, then follow the bulk assignment flow below. Create a missing label only when that is part of the authorized request. An explicit request to create labels or apply them to a specified set of contacts authorizes that operation; otherwise confirm the target and intended change before mutating.
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.
key. To remove a label, or to
use only a label that already exists, look it up by name instead of creating it:
POST https://www.wixapis.com/contacts/v4/labels/query with
{"query":{"filter":{"displayName":{"$eq":"Newsletter"}}}}, and take each returned label's key.POST https://www.wixapis.com/contacts/v5/contacts/search with {"search":{"search":{"expression":"Leo Marsh"}}}.
Each result in contacts has an id and name.first / name.last; keep only exact name matches. If none or
more than one contact matches, stop and ask the user.{"filter":{"id":{"$in":["<CONTACT_ID>"]}},"labelKeysToAdd":["<LABEL_KEY>"]} (or labelKeysToRemove).GET https://www.wixapis.com/contacts/v4/bulk/jobs/{jobId}; repeat until
job.status is COMPLETED, then report job.successTotal and job.failedTotal.POST https://www.wixapis.com/contacts/v4/bulk/contacts/add-remove-labels
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.
The response includes a jobId which can be used to track the bulk job status:
Use the Get Bulk Job endpoint to check the job status.
CONTACTS.MODIFYLast updated: 28 September 2026