Skip to the documentation
API

Move what a sender sent

Clear a sender out of the inbox, and keep it out.

POST/subscriptions/{id}/move

Runs the real call on your workspace.

POST /subscriptions/{id}/move

Clear a sender out of the inbox, and keep it out.

Example

Needs threads:write. destination is archive, bin or label, with the label in labelId. Every conversation from the sender moves there, and with future, true unless you say otherwise, a rule keeps doing it to new mail from the sender to that address.

curl
curl -X POST "$OE/subscriptions/sub_5d2c8e17/move" -H "$AUTH" \  -H "Content-Type: application/json" -d '{ "destination": "label", "labelId": "USER_NEWSLETTERS" }'
Response
{  "object": "subscription_move",  "subscriptionId": "sub_5d2c8e17",  "moved": 58,  "ruleId": "rul_7f3a1c94e05d3862c1f0a44b"}

Keeping it going needs rules:write too, so a key without it passes future: false to move what is there and nothing more. With rules:write, future: false also drops a rule made this way before.

A label that does not exist is a 422 label_not_found.

Reference