Skip to the documentation
MCP server

Subscriptions

The newsletters and mailing lists the mailbox receives.

Subscriptions tools

ToolWhat it does
listSubscriptionsThe senders of newsletters and mailing lists, one row per sender and the address it writes to, with how much mail each sent, how much of it was read and how it lets you unsubscribe. suggested lists only the rarely read ones.
listSubscriptionDomainsThe same, one row per sender domain, with how many of its senders can be unsubscribed without a person opening a page.
unsubscribeSubscriptionUnsubscribe from one sender the way it asks for. A sender that only offers a page returns its link for a person to open.
unsubscribeSubscriptionDomainUnsubscribe from every sender on a domain that takes a one-click request or an email, and count the rest.
unsubscribeThreadUnsubscribe from the sender of a thread, as the Unsubscribe button of the reading pane does.
moveSubscriptionMove everything a sender sent to the archive, the Bin or a label, and with future keep moving its new mail with a rule.
keepSubscriptionsKeep the subscriptions you want, so they are never suggested again, or put them back to active.
unsubscribeSubscriptionsUnsubscribe from up to 100 senders at once, and list the ones that only unsubscribe on their own page.
moveSubscriptionsMove everything up to 100 senders sent to the archive, the Bin or a label, as moveSubscription does for one.

Reading needs “Read threads and messages” (threads:read), and keeping, unsubscribing and moving need “Label, read and archive threads” (threads:write). Keeping new mail moving makes a rule, which also needs “Create, edit and reorder mail rules” (rules:write). A client limited to some addresses reaches only the subscriptions delivered to them.

Unsubscribing sends a request or an email to the sender, and nothing here takes it back. In the app’s chat, unsubscribeSubscriptionDomain, unsubscribeSubscriptions and moveSubscriptions always ask first, and the other changes ask unless you asked for them.

Reference

listSubscriptions

Scopesthreads:readThe app's assistant runs it without askingToolkitsubscriptions

The newsletters and mailing lists the mailbox receives, as the Subscriptions page shows them: one row per sender and the address it writes to, with how much mail it sent, how much is unread, what share of it was read and how it lets you unsubscribe. A row marked Suggested is an active sender that is rarely read and still writing, worth unsubscribing from; suggested: true lists only those. status is active (the default), kept (ones the person chose to keep) or unsubscribed. query searches the sender, sort is recent, most, emails, read (least read first), unread or name, and offset pages on.

Inputs

statusstring
One of"active""kept""unsubscribed"
querystring
Up to 200 characters
sortstring
One of"recent""most""emails""read""unread""name"
suggestedboolean
limitinteger
At least 1At most 200
offsetinteger
At least 0
addressstring
3 to 320 characters

Also available in

API
GET /subscriptions
TypeScript
nextmail.subscriptions.list()
Python
subscriptions.list()
Ruby
subscriptions.list
PHP
subscriptions->list
Go
Subscriptions.List
Java
subscriptions().list
C#
Subscriptions.ListAsync

listSubscriptionDomains

Scopesthreads:readThe app's assistant runs it without askingToolkitsubscriptions

The same subscriptions grouped by sender domain, so a company that writes from several addresses is one row, with how many of its senders can be unsubscribed without a person opening a page. Takes the same filters as listSubscriptions.

Inputs

statusstring
One of"active""kept""unsubscribed"
querystring
Up to 200 characters
sortstring
One of"recent""most""emails""read""unread""name"
suggestedboolean
limitinteger
At least 1At most 200
offsetinteger
At least 0
addressstring
3 to 320 characters

Also available in

API
GET /subscriptions/domains
TypeScript
nextmail.subscriptions.listDomains()
Python
subscriptions.list_domains()
Ruby
subscriptions.list_domains
PHP
subscriptions->listDomains
Go
Subscriptions.ListDomains
Java
subscriptions().listDomains
C#
Subscriptions.ListDomainsAsync

unsubscribeSubscription

Scopesthreads:writeThe app's assistant asks first unless you asked for itToolkitsubscriptions

Unsubscribe from one sender the way it asks for: a one-click request when it offers one, otherwise an unsubscribe email from the address the mail arrived at. A sender that only offers a page returns its link, which a person has to open. bin also moves every conversation from the sender to the Bin, and archive archives them instead. Take the id from listSubscriptions.

Inputs

idstringRequired
1 to 64 characters
binboolean
archiveboolean

Also available in

API
POST /subscriptions/{id}/unsubscribe
TypeScript
nextmail.subscriptions.unsubscribe()
Python
subscriptions.unsubscribe()
Ruby
subscriptions.unsubscribe
PHP
subscriptions->unsubscribe
Go
Subscriptions.Unsubscribe
Java
subscriptions().unsubscribe
C#
Subscriptions.UnsubscribeAsync

unsubscribeSubscriptionDomain

Scopesthreads:writeThe app's assistant always asks firstToolkitsubscriptions

Unsubscribe from every sender on one domain that can be unsubscribed without a person opening a page, as the domain view of the Subscriptions page does. Senders that only offer a page, and the ones the person kept, are skipped. bin also moves their conversations to the Bin, archive archives them instead, and address keeps it to the subscriptions delivered to one address.

Inputs

domainstringRequired
1 to 253 characters
addressstring
3 to 320 characters
binboolean
archiveboolean

Also available in

API
POST /subscriptions/domains/{domain}/unsubscribe
TypeScript
nextmail.subscriptions.unsubscribeDomain()
Python
subscriptions.unsubscribe_domain()
Ruby
subscriptions.unsubscribe_domain
PHP
subscriptions->unsubscribeDomain
Go
Subscriptions.UnsubscribeDomain
Java
subscriptions().unsubscribeDomain
C#
Subscriptions.UnsubscribeDomainAsync

unsubscribeThread

Scopesthreads:writeThe app's assistant asks first unless you asked for itToolkitsubscriptions

Unsubscribe from the sender of an email thread, as the Unsubscribe button of the reading pane does, from the newest message in it that carries an unsubscribe header.

Inputs

threadIdstringRequired
1 to 200 characters

Also available in

API
POST /threads/{id}/unsubscribe
TypeScript
nextmail.threads.unsubscribe()
Python
threads.unsubscribe()
Ruby
threads.unsubscribe
PHP
threads->unsubscribe
Go
Threads.Unsubscribe
Java
threads().unsubscribe
C#
Threads.UnsubscribeAsync

moveSubscription

Scopesthreads:writeThe app's assistant asks first unless you asked for itToolkitsubscriptions

Move every conversation from one sender to the archive, the Bin or a label. future, true by default, also makes a rule that keeps doing it to new mail from the sender, which needs permission to change rules, and false drops such a rule. labelId is the label for destination label, from getUserLabels.

Inputs

idstringRequired
1 to 64 characters
destinationstringRequired
One of"archive""bin""label"
labelIdstring
1 to 200 characters
futureboolean
ruleNamestring
Up to 100 characters

Also available in

API
POST /subscriptions/{id}/move
TypeScript
nextmail.subscriptions.move()
Python
subscriptions.move()
Ruby
subscriptions.move
PHP
subscriptions->move
Go
Subscriptions.Move
Java
subscriptions().move
C#
Subscriptions.MoveAsync

keepSubscriptions

Scopesthreads:writeThe app's assistant asks first unless you asked for itToolkitsubscriptions

Keep subscriptions the person wants, as Keep on the Subscriptions page does: they move from active to kept and are never suggested for unsubscribing again. kept: false puts kept ones back to active. ids come from listSubscriptions.

Inputs

idsstring[]Required
1 to 100 items
keptboolean

Also available in

API
POST /subscriptions/batch-keep
TypeScript
nextmail.subscriptions.keep()
Python
subscriptions.keep()
Ruby
subscriptions.keep
PHP
subscriptions->keep
Go
Subscriptions.Keep
Java
subscriptions().keep
C#
Subscriptions.KeepAsync

unsubscribeSubscriptions

Scopesthreads:writeThe app's assistant always asks firstToolkitsubscriptions

Unsubscribe from several senders at once, as Unsubscribe on a selection of the Subscriptions page does: each one by one-click request or an unsubscribe email. Senders that only offer a page are listed with the link a person has to open, and stay active. archive also archives every conversation from the senders, bin moves them to the Bin instead. ids come from listSubscriptions, for example the rows marked Suggested.

Inputs

idsstring[]Required
1 to 100 items
archiveboolean
binboolean

Also available in

API
POST /subscriptions/batch-unsubscribe
TypeScript
nextmail.subscriptions.unsubscribeMany()
Python
subscriptions.unsubscribe_many()
Ruby
subscriptions.unsubscribe_many
PHP
subscriptions->unsubscribeMany
Go
Subscriptions.UnsubscribeMany
Java
subscriptions().unsubscribeMany
C#
Subscriptions.UnsubscribeManyAsync

moveSubscriptions

Scopesthreads:writeThe app's assistant always asks firstToolkitsubscriptions

Move every conversation from several senders to the archive, the Bin or a label, as Archive on a selection of the Subscriptions page does. future, true by default, also makes a rule per sender that keeps doing it to new mail, which needs permission to change rules. labelId is the label for destination label, from getUserLabels. ids come from listSubscriptions.

Inputs

idsstring[]Required
1 to 100 items
destinationstringRequired
One of"archive""bin""label"
labelIdstring
1 to 200 characters
futureboolean

Also available in

API
POST /subscriptions/batch-move
TypeScript
nextmail.subscriptions.moveMany()
Python
subscriptions.move_many()
Ruby
subscriptions.move_many
PHP
subscriptions->moveMany
Go
Subscriptions.MoveMany
Java
subscriptions().moveMany
C#
Subscriptions.MoveManyAsync