Remove duplicate contacts

Remove duplicate contacts inside one list, by phone number or email.

DELETE https://cotlet.dev/api/v1/clicksend/lists/{list_id}/duplicates

write Confirm

Runs Clean Up > Remove Duplicates on one list, comparing the field you pick. It works inside one list only, never across lists. The result is the number of contacts the list lost. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: remove_duplicates
NameTypeDescription
list_id integer required integer Contact list ID from list_contact_lists.
field enum required enum phone_number or email.

Request

cURL
curl -X DELETE "https://cotlet.dev/api/v1/clicksend/lists/1/duplicates?field=phone_number" \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("clicksend", "remove_duplicates", {"list_id":1,"field":"phone_number"})
Node.js
const result = await cotlet.call('clicksend', 'remove_duplicates', {"list_id":1,"field":"phone_number"});
CLI
cotlet call clicksend remove_duplicates --data '{"list_id":1,"field":"phone_number"}'

Example response

JSON

{
  "list_id": 128734,
  "list": "Newsletter subscribers",
  "compared": "phone_number",
  "removed": 9
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.