구독
이 그룹의 모든 작업: 받는 값, 반환하는 값, 응답할 수 있는 오류.
작업
Newsletters and mailing lists the mailbox receives, found from the List-Unsubscribe header of the mail they send, as the Subscriptions page of the app shows them. Unsubscribe from one sender or a whole domain, or move what they sent and keep moving what they send.
GET/subscriptions
List subscriptions
One row per sender and address it writes to, with how much mail it sent, how much of it is unread and how much arrived in the last 30 days. A key or an app limited to particular addresses lists only the subscriptions delivered to them.
Requires the threads:read scope.
쿼리 매개변수
statusstringactivelists what still arrives,unsubscribedwhat you left.다음 중 하나"active""unsubscribed"기본값"active"qstringSearches the sender name and address.
최대 200자sortstringrecentputs the newest mail first,mostthe senders with the most mail,unreadthose with the most unread,namesorts by sender.다음 중 하나"recent""most""unread""name"기본값"recent"limitintegerRows per page.
1 이상200 이하기본값50offsetintegerHow many rows to skip, for the next page.
0 이상기본값0addressstringOnly the subscriptions delivered to this address. One the key does not reach lists nothing.
3~320자
반환값
A page of subscriptions.
오류
모든 작업이 반환할 수 있는 오류400401403404422500오류 목록
다른 사용처
GET/subscriptions/domains
List subscriptions by domain
The same subscriptions, one row per sender domain with the counts of its senders added up, so a company that writes from several addresses is one row.
Requires the threads:read scope.
쿼리 매개변수
statusstringactivelists what still arrives,unsubscribedwhat you left.다음 중 하나"active""unsubscribed"기본값"active"qstringSearches the sender name and address.
최대 200자sortstringrecentputs the newest mail first,mostthe senders with the most mail,unreadthose with the most unread,namesorts by sender.다음 중 하나"recent""most""unread""name"기본값"recent"limitintegerRows per page.
1 이상200 이하기본값50offsetintegerHow many rows to skip, for the next page.
0 이상기본값0addressstringOnly the subscriptions delivered to this address. One the key does not reach lists nothing.
3~320자
반환값
A page of sender domains.
오류
모든 작업이 반환할 수 있는 오류400401403404422500오류 목록
다른 사용처
POST/subscriptions/domains/{domain}/unsubscribe
Unsubscribe from a whole domain
Unsubscribes from every sender on the domain that can be unsubscribed without a person opening a page, with one-click or by email. skipped counts the senders that only offer a page, and failed the ones that did not accept it. Unsubscribing works the way the sender asks for it: a one-click request to its unsubscribe address when it offers one, an unsubscribe email from the address the mail arrived at when it gives a mailto, and otherwise the sender's own unsubscribe page in url, which a person has to open. method says which.
Requires the threads:write scope.
경로 매개변수
domainstring필수The sender domain, as
GET /subscriptions/domainsreturns it.
요청 본문
binbooleanAlso move every conversation from the senders to the Bin.
기본값falseaddressstringOnly the subscriptions delivered to this address.
3~320자
반환값
What happened to each sender, counted.
오류
모든 작업이 반환할 수 있는 오류400401403404422500오류 목록
다른 사용처
POST/subscriptions/{id}/unsubscribe
Unsubscribe from a sender
Unsubscribing works the way the sender asks for it: a one-click request to its unsubscribe address when it offers one, an unsubscribe email from the address the mail arrived at when it gives a mailto, and otherwise the sender's own unsubscribe page in url, which a person has to open. method says which. With bin, every conversation from the sender also moves to the Bin.
Requires the threads:write scope.
경로 매개변수
idstring필수The subscription, as
GET /subscriptionsreturns it.
요청 본문
binbooleanAlso move every conversation from the sender to the Bin.
기본값false
반환값
How it was unsubscribed.
오류
- 422
unsubscribe_unsupported: the sender gives no way to unsubscribe.- 502
unsubscribe_refused: the sender did not accept the one-click request and gives no address to write to.
모든 작업이 반환할 수 있는 오류400401403404500오류 목록
다른 사용처
POST/subscriptions/{id}/move
Move what a sender sent
Moves every conversation from the sender to the archive, the Bin or a label. With future, the default, a rule keeps doing it to new mail from the sender to that address, which also needs rules:write. future: false drops a rule made that way before.
Requires the threads:write scope.
경로 매개변수
idstring필수The subscription, as
GET /subscriptionsreturns it.
요청 본문
destinationstring필수archive,binorlabel.다음 중 하나"archive""bin""label"labelIdstringThe label to file under when
destinationislabel.null 가능1~200자futurebooleanAlso keep doing it to new mail from the sender, with a rule. Needs
rules:write.기본값trueruleNamestringA name for that rule.
null 가능최대 100자
반환값
How many conversations moved, and the rule.
오류
모든 작업이 반환할 수 있는 오류400401403404422500오류 목록
다른 사용처
POST/threads/{id}/unsubscribe
Unsubscribe from the sender of a thread
The Unsubscribe button of the reading pane: finds the subscription behind the newest message of the thread that carries a List-Unsubscribe header and unsubscribes from it. Unsubscribing works the way the sender asks for it: a one-click request to its unsubscribe address when it offers one, an unsubscribe email from the address the mail arrived at when it gives a mailto, and otherwise the sender's own unsubscribe page in url, which a person has to open. method says which.
Requires the threads:write scope.
경로 매개변수
idstring필수The thread, as
GET /threadsreturns it.
반환값
How it was unsubscribed.
오류
- 422
unsubscribe_unsupported: the sender gives no way to unsubscribe.- 502
unsubscribe_refused: the sender did not accept the one-click request and gives no address to write to.
모든 작업이 반환할 수 있는 오류400401403404500오류 목록
다른 사용처
객체
DomainUnsubscribeResultobject
objectstring- 다음 중 하나
"domain_unsubscribe" domainstringunsubscribedintegerskippedintegerSenders that only offer a page.
failedintegerbinnedinteger
Subscriptionobject
objectstring- 다음 중 하나
"subscription" idstringsenderEmailstringsenderNamestring- null 가능
recipientstringThe address the mail arrives at.
statusstring- 다음 중 하나
"active""unsubscribed" methodstringHow the sender lets you unsubscribe, or null when it gives no way.
null 가능다음 중 하나"one-click""email""link"linkUrlstringIts unsubscribe page, when it has one.
null 가능unreadintegerrecentintegerMail in the last 30 days.
totalintegersinceUnsubscribedintegerMail that still arrived after you unsubscribed.
lastSeenAtstring- 형식
date-time unsubscribedAtstring- null 가능형식
date-time unsubscribedWithstring- null 가능다음 중 하나
"one-click""email""link" futureobjectThe rule that keeps moving its new mail, when there is one.
null 가능ruleIdstringdestinationstring- 다음 중 하나
"archive""bin""label" labelIdstring- null 가능
SubscriptionDomainobject
objectstring- 다음 중 하나
"subscription_domain" domainstringnamestringsampleEmailstringOne sender address on the domain.
sendersintegerunsubscribableintegerSenders that can be unsubscribed without a person opening a page.
unreadintegerrecentintegertotalintegersinceUnsubscribedintegerlastSeenAtstring- 형식
date-time
SubscriptionDomainListobject
objectstring- 다음 중 하나
"list" totalintegercountsobjectactiveintegerunsubscribedinteger
hasMoreboolean
SubscriptionListobject
objectstring- 다음 중 하나
"list" dataSubscription[]totalintegerRows that match, across every page.
countsobjectactiveintegerunsubscribedinteger
hasMoreboolean
SubscriptionMoveResultobject
objectstring- 다음 중 하나
"subscription_move" subscriptionIdstringmovedintegerConversations moved.
ruleIdstringThe rule that keeps moving new mail.
null 가능
UnsubscribeResultobject
objectstring- 다음 중 하나
"unsubscribe" subscriptionIdstringthreadIdstringPresent when it was asked for through a thread.
methodstring- 다음 중 하나
"one-click""email""link" urlstringThe page to open when
methodislink, since that one needs a person.null 가능binnedintegerConversations moved to the Bin.