Bulk update contact tags

Adds, removes, or replaces tags on multiple contacts in one request, returning counts of updated and failed records. One request carries at most 1000 ids.

POST
/v1/contacts/bulk-update-tags

Adds, removes, or replaces tags on multiple contacts in one request, returning counts of updated and failed records. One request carries at most 1000 ids.

Authorization

apiKey
headerx-api-key<token>

Request Body

application/json
  1. body
ids*array<>
Items1 <= items <= 1000
operation*string
Value in"add""remove""set"
tags*array<string>
Items1 <= items

Response Body

BulkUpdateResult

application/json
  1. response
updated*integer
Range0 <= value <= 9007199254740991
failed*integer
Range0 <= value <= 9007199254740991
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.contacts.bulkUpdateTags({  "ids": [    "example"  ],  "operation": "add",  "tags": [    "example"  ]});
Example Response
{  "updated": 0,  "failed": 0}

Related documentation