Unsubscribe from several senders
What Unsubscribe does on a selection of the Subscriptions page.
Runs the real call on your workspace.
POST /subscriptions/batch-unsubscribe
What Unsubscribe does on a selection of the Subscriptions page.
Example
Needs threads:write. ids takes 1 to 100 subscriptions, for example the rows of GET /subscriptions?suggested=true. Each one is unsubscribed the way POST /subscriptions/{id}/unsubscribe does it, and archive and bin work the same.
curl -X POST "$OE/subscriptions/batch-unsubscribe" -H "$AUTH" \ -H "Content-Type: application/json" -d '{ "ids": ["sub_5d2c8e17", "sub_2b77c9d1"], "archive": true }'{ "object": "subscription_batch_unsubscribe", "unsubscribed": ["sub_5d2c8e17"], "links": [{ "id": "sub_2b77c9d1", "url": "https://news.example.com/leave" }], "skipped": [], "failed": [], "missing": [], "binned": 0, "archived": 58}unsubscribed holds the ones done with a one-click request or an unsubscribe email. A sender that only unsubscribes on its own page comes back in links with the page a person has to open, and stays active until somebody does.
skipped holds the ones already unsubscribed (already_unsubscribed) or that give no way to unsubscribe (no_method), failed the ones whose sender did not accept it, and missing the ids that are unknown or delivered to an address the key does not reach.