Unsubscribe members from email

Turn off newsletter emails for the given members.

POST https://cotlet.dev/api/v1/ghost/members/unsubscribe

write Confirm

Returns how many members were unsubscribed. Their account and tier stay as they are, and they can subscribe again in their account or you can switch the Subscribed to newsletter toggle in their profile. It changes what real people receive, so the agent should show the list first. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: unsubscribe_members
NameTypeDescription
member_ids string[] required string[] Member IDs from list_members.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/ghost/members/unsubscribe \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"member_ids":["6710c3e5b1c2d400a1b2c4f1","6710c3e5b1c2d400a1b2c4f2","6710c3e5b1c2d400a1b2c4f3"]}'
Python
result = client.call("ghost", "unsubscribe_members", {"member_ids":["6710c3e5b1c2d400a1b2c4f1","6710c3e5b1c2d400a1b2c4f2","6710c3e5b1c2d400a1b2c4f3"]})
Node.js
const result = await cotlet.call('ghost', 'unsubscribe_members', {"member_ids":["6710c3e5b1c2d400a1b2c4f1","6710c3e5b1c2d400a1b2c4f2","6710c3e5b1c2d400a1b2c4f3"]});
CLI
cotlet call ghost unsubscribe_members --data '{"member_ids":["6710c3e5b1c2d400a1b2c4f1","6710c3e5b1c2d400a1b2c4f2","6710c3e5b1c2d400a1b2c4f3"]}'

Example response

JSON

{
  "unsubscribed": 3,
  "skipped": 0,
  "failed": []
}

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.