ドキュメント本文へスキップ
MCPサーバー

購読

メールボックスが受け取るニュースレターやメーリングリスト。

購読のツール

ツール機能
listSubscriptionsニュースレターやメーリングリストの送信者を、送信者と送信先アドレスの組み合わせごとに 1 行で示し、それぞれが送ったメールの量と、購読解除の方法を添える。
listSubscriptionDomains同じものを送信者のドメインごとに 1 行にまとめ、そのうち人がページを開かなくても購読を解除できる送信者の数を添える。
unsubscribeSubscription1 人の送信者の購読を、その送信者が求める方法で解除する。ページしか用意していない送信者の場合は、人が開くためのリンクを返す。
unsubscribeSubscriptionDomainドメイン内で、ワンクリックのリクエストかメールを受け付けるすべての送信者の購読を解除し、残りを数える。
unsubscribeThread閲覧ペインの「購読を解除」ボタンと同じように、スレッドの送信者の購読を解除する。
moveSubscription送信者が送ったものをすべてアーカイブ、ゴミ箱、またはラベルに移し、future を指定すれば、ルールで新しいメールも移し続ける。

読み取りには「スレッドとメッセージを読み取る」(threads:read)、購読の解除と移動には「スレッドにラベルを付け、既読にし、アーカイブする」(threads:write)が必要である。新しいメールを移動し続けるとルールが作られ、それには「メールルールを作成・編集・並べ替えする」(rules:write)も必要になる。一部のアドレスに限定されたクライアントが届くのは、それらのアドレスに届く購読だけである。

購読を解除すると送信者にリクエストかメールが送られ、ここにはそれを取り消す手段はない。アプリのチャットでは、unsubscribeSubscriptionDomain は必ず先に確認し、ほかの変更は依頼された場合を除いて確認する。

リファレンス

listSubscriptions

スコープthreads:readアプリのアシスタントは確認せずに実行しますツールキットsubscriptions

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 and how it lets you unsubscribe. status is active (the default) or unsubscribed. query searches the sender, sort is recent, most, unread or name, and offset pages on.

入力

statusstring
次のいずれか"active""unsubscribed"
querystring
200文字まで
sortstring
次のいずれか"recent""most""unread""name"
limitinteger
1以上200以下
offsetinteger
0以上
addressstring
3〜320文字

ほかの提供先

API
GET /subscriptions
SDK
subscriptions.list()

listSubscriptionDomains

スコープthreads:readアプリのアシスタントは確認せずに実行しますツールキットsubscriptions

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.

入力

statusstring
次のいずれか"active""unsubscribed"
querystring
200文字まで
sortstring
次のいずれか"recent""most""unread""name"
limitinteger
1以上200以下
offsetinteger
0以上
addressstring
3〜320文字

ほかの提供先

API
GET /subscriptions/domains
SDK
subscriptions.listDomains()

unsubscribeSubscription

スコープthreads:writeご自身で依頼した場合を除き、アプリのアシスタントは先に確認しますツールキットsubscriptions

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. Take the id from listSubscriptions.

入力

idstring必須
1〜64文字
binboolean

ほかの提供先

API
POST /subscriptions/{id}/unsubscribe
SDK
subscriptions.unsubscribe()

unsubscribeSubscriptionDomain

スコープthreads:writeアプリのアシスタントは必ず先に確認しますツールキットsubscriptions

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 are skipped and counted. bin also moves their conversations to the Bin, and address keeps it to the subscriptions delivered to one address.

入力

domainstring必須
1〜253文字
addressstring
3〜320文字
binboolean

ほかの提供先

API
POST /subscriptions/domains/{domain}/unsubscribe
SDK
subscriptions.unsubscribeDomain()

unsubscribeThread

スコープthreads:writeご自身で依頼した場合を除き、アプリのアシスタントは先に確認しますツールキットsubscriptions

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.

入力

threadIdstring必須
1〜200文字

ほかの提供先

API
POST /threads/{id}/unsubscribe
SDK
threads.unsubscribe()

moveSubscription

スコープthreads:writeご自身で依頼した場合を除き、アプリのアシスタントは先に確認しますツールキットsubscriptions

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.

入力

idstring必須
1〜64文字
destinationstring必須
次のいずれか"archive""bin""label"
labelIdstring
1〜200文字
futureboolean
ruleNamestring
100文字まで

ほかの提供先

API
POST /subscriptions/{id}/move
SDK
subscriptions.move()