Merge multiple tags into a single target tag. This is essential for cleaning up duplicate tags.
Common use cases:
- Combine case variations: "Newsletter", "newsletter", "NEWSLETTER" → "newsletter"
- Consolidate similar tags: "vip", "VIP Customer", "vip-member" → "VIP"
- Fix duplicates after import: "customer-2024", "customer-2025" → "customer"
How it works:
- For each contact with any source tag:
- Adds target tag (if not already present)
- Removes all source tags
- Atomic operation (all or nothing)
- Returns count of affected contacts
Example: If contact has tags ["Newsletter", "newsletter"], merging both into "newsletter" results in just ["newsletter"].
Note: You can include the target tag in source_tags array - it will handle this correctly.
Security
ApiKeyAuth
- US Data Centerhttps://api.mailerlogic.net/api/v1/contacts/tags/merge
- EU Data Center (coming soon)https://eu-api.mailerlogic.net/api/v1/contacts/tags/merge
- Consolidate case variations
- Merge VIP variations
- Cleanup yearly customer tags
curl -i -X POST \
https://api.mailerlogic.net/api/v1/contacts/tags/merge \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"source_tags": [
"Newsletter",
"newsletter",
"NEWSLETTER"
],
"target_tag": "newsletter"
}'Response
{ "success": true, "data": { "source_tags": [ … ], "target_tag": "newsletter", "contacts_affected": 150, "tags_removed": 298, "tags_added": 23 } }