API
Unsubscribe from the sender of a thread
What the Unsubscribe button of the reading pane does.
POST/threads/{id}/unsubscribe
Runs the real call on your workspace.
POST /threads/{id}/unsubscribe
What the Unsubscribe button of the reading pane does.
Example
Needs threads:write. It finds the subscription behind the newest message of the thread that carries a List-Unsubscribe header, and unsubscribes from it the way the sender asks for, as POST /subscriptions/{id}/unsubscribe does.
curl -X POST "$OE/threads/thr_7c1e4a90/unsubscribe" -H "$AUTH"{ "object": "unsubscribe", "threadId": "thr_7c1e4a90", "subscriptionId": "sub_5d2c8e17", "method": "email", "url": null, "binned": 0}A thread with no message that carries the header, like a sender that gives no way to unsubscribe, is a 422 unsubscribe_unsupported, and a sender that did not accept the request is a 502 unsubscribe_refused. A thread the key does not reach is a 404.