Unsubscribe contacts

Mark contacts as unsubscribed in bulk, by segment, tag or email addresses.

POST https://cotlet.dev/api/v1/emailoctopus/lists/{list_id}/contacts/unsubscribe

write Confirm

Does what Actions, then Mark as unsubscribed, does on the contacts page. Give exactly one of segment, tag or emails. Unsubscribed contacts stay in the list and stop counting towards your plan's subscriber limit; the tool never deletes a contact. An unsubscribed contact cannot be re-subscribed through an import. It returns how many contacts changed. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: unsubscribe_contacts
NameTypeDescription
list_id string required string List ID from list_lists.
segment string string Segment name from list_segments.
tag string string Unsubscribe the contacts with this tag.
emails array array Email addresses to unsubscribe.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/emailoctopus/lists/4d1c8e5a-7f2b-4c1e-9a63-0b5d2e8f1a37/contacts/unsubscribe \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"segment":"Inactive for 90 days"}'
Python
result = client.call("emailoctopus", "unsubscribe_contacts", {"list_id":"4d1c8e5a-7f2b-4c1e-9a63-0b5d2e8f1a37","segment":"Inactive for 90 days"})
Node.js
const result = await cotlet.call('emailoctopus', 'unsubscribe_contacts', {"list_id":"4d1c8e5a-7f2b-4c1e-9a63-0b5d2e8f1a37","segment":"Inactive for 90 days"});
CLI
cotlet call emailoctopus unsubscribe_contacts --data '{"list_id":"4d1c8e5a-7f2b-4c1e-9a63-0b5d2e8f1a37","segment":"Inactive for 90 days"}'

Example response

JSON

{
  "list_id": "4d1c8e5a-7f2b-4c1e-9a63-0b5d2e8f1a37",
  "segment": "Inactive for 90 days",
  "unsubscribed": 212
}

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.