Tag contacts
Add a Privy tag to contacts, or remove it from them.
POST https://cotlet.dev/api/v1/privy/contacts/tag
write Confirm
Does what Bulk Actions > Tag Contacts does. A tag can start a flow set to Contact Tagged or Contact Untagged, and that flow can email or text those contacts, which is why this call waits for you. Tag-triggered flows fire only when the tag changes. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| tag string required | string | Tag name. Privy saves bulk tag names in lowercase |
| action string required | string | add or remove |
| contact_ids array required | array | Contact ids from list_contacts |
Request
curl -X POST https://cotlet.dev/api/v1/privy/contacts/tag \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tag":"tag","action":"action","contact_ids":"contact ids"}' result = client.call("privy", "tag_contacts", {"tag":"tag","action":"action","contact_ids":"contact ids"}) const result = await cotlet.call('privy', 'tag_contacts', {"tag":"tag","action":"action","contact_ids":"contact ids"}); cotlet call privy tag_contacts --data '{"tag":"tag","action":"action","contact_ids":"contact ids"}' Example response
{
"tag": "sunset",
"action": "add",
"tagged": 2,
"contacts": [
"cus_91f2",
"cus_a4c7"
]
}