Saltar para a documentação
Servidor MCP

Subscrições

As newsletters e as listas de distribuição que a caixa de correio recebe.

Ferramentas de subscrições

FerramentaO que faz
listSubscriptionsOs remetentes de newsletters e listas de distribuição, uma linha por remetente e por endereço para onde escreve, com quanto correio cada um enviou e como permite cancelar a subscrição.
listSubscriptionDomainsO mesmo, uma linha por domínio de remetente, com quantos dos seus remetentes permitem cancelar a subscrição sem que uma pessoa abra uma página.
unsubscribeSubscriptionCancelar a subscrição de um só remetente, da forma que ele pede. Um remetente que só oferece uma página devolve a ligação para uma pessoa a abrir.
unsubscribeSubscriptionDomainCancelar a subscrição de todos os remetentes de um domínio que aceitam um pedido de um clique ou um email, e contar os restantes.
unsubscribeThreadCancelar a subscrição do remetente de uma conversa, tal como faz o botão Desinscrever do painel de leitura.
moveSubscriptionMover tudo o que um remetente enviou para o arquivo, o Lixo ou uma etiqueta e, com future, continuar a mover o correio novo dele com uma regra.

Ler exige «Read threads and messages» (threads:read), e cancelar subscrições e mover exigem «Label, read and archive threads» (threads:write). Continuar a mover o correio novo cria uma regra, que também exige «Create, edit and reorder mail rules» (rules:write). Um cliente limitado a alguns endereços só alcança as subscrições entregues a eles.

Cancelar uma subscrição envia um pedido ou um email ao remetente, e nada aqui o desfaz. No chat da aplicação, unsubscribeSubscriptionDomain pergunta sempre primeiro, e as outras alterações perguntam, a menos que as tenha pedido.

Referência

listSubscriptions

Âmbitosthreads:readO assistente da app executa-o sem perguntarConjunto de ferramentassubscriptions

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.

Entradas

statusstring
Um de"active""unsubscribed"
querystring
Até 200 caracteres
sortstring
Um de"recent""most""unread""name"
limitinteger
Pelo menos 1No máximo 200
offsetinteger
Pelo menos 0
addressstring
De 3 a 320 caracteres

Também disponível em

API
GET /subscriptions
SDK
subscriptions.list()

listSubscriptionDomains

Âmbitosthreads:readO assistente da app executa-o sem perguntarConjunto de ferramentassubscriptions

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.

Entradas

statusstring
Um de"active""unsubscribed"
querystring
Até 200 caracteres
sortstring
Um de"recent""most""unread""name"
limitinteger
Pelo menos 1No máximo 200
offsetinteger
Pelo menos 0
addressstring
De 3 a 320 caracteres

Também disponível em

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

unsubscribeSubscription

Âmbitosthreads:writeO assistente da app pergunta primeiro, a menos que o tenha pedidoConjunto de ferramentassubscriptions

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.

Entradas

idstringObrigatório
De 1 a 64 caracteres
binboolean

Também disponível em

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

unsubscribeSubscriptionDomain

Âmbitosthreads:writeO assistente da app pergunta sempre primeiroConjunto de ferramentassubscriptions

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.

Entradas

domainstringObrigatório
De 1 a 253 caracteres
addressstring
De 3 a 320 caracteres
binboolean

Também disponível em

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

unsubscribeThread

Âmbitosthreads:writeO assistente da app pergunta primeiro, a menos que o tenha pedidoConjunto de ferramentassubscriptions

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.

Entradas

threadIdstringObrigatório
De 1 a 200 caracteres

Também disponível em

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

moveSubscription

Âmbitosthreads:writeO assistente da app pergunta primeiro, a menos que o tenha pedidoConjunto de ferramentassubscriptions

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.

Entradas

idstringObrigatório
De 1 a 64 caracteres
destinationstringObrigatório
Um de"archive""bin""label"
labelIdstring
De 1 a 200 caracteres
futureboolean
ruleNamestring
Até 100 caracteres

Também disponível em

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