दस्तावेज़ पर जाएँ
API

सदस्यताएँ

इस समूह का हर ऑपरेशन: वह क्या लेता है, क्या लौटाता है और किन त्रुटियों के साथ जवाब दे सकता है।

ऑपरेशन

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

स्कोपthreads:readपढ़ता है

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.

क्वेरी पैरामीटर

statusstring

active lists what still arrives, unsubscribed what you left.

इनमें से एक"active""unsubscribed"डिफ़ॉल्ट"active"
qstring

Searches the sender name and address.

अधिकतम 200 वर्ण
sortstring

recent puts the newest mail first, most the senders with the most mail, unread those with the most unread, name sorts by sender.

इनमें से एक"recent""most""unread""name"डिफ़ॉल्ट"recent"
limitinteger

Rows per page.

कम से कम 1अधिकतम 200डिफ़ॉल्ट50
offsetinteger

How many rows to skip, for the next page.

कम से कम 0डिफ़ॉल्ट0
addressstring

Only the subscriptions delivered to this address. One the key does not reach lists nothing.

3 से 320 वर्ण

लौटाता है

A page of subscriptions.

त्रुटियाँ

वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची

इनमें भी उपलब्ध

SDK
subscriptions.list()
CLI
openemail subscriptions list
MCP
listSubscriptions

GET/subscriptions/domains

List subscriptions by domain

स्कोपthreads:readपढ़ता है

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.

क्वेरी पैरामीटर

statusstring

active lists what still arrives, unsubscribed what you left.

इनमें से एक"active""unsubscribed"डिफ़ॉल्ट"active"
qstring

Searches the sender name and address.

अधिकतम 200 वर्ण
sortstring

recent puts the newest mail first, most the senders with the most mail, unread those with the most unread, name sorts by sender.

इनमें से एक"recent""most""unread""name"डिफ़ॉल्ट"recent"
limitinteger

Rows per page.

कम से कम 1अधिकतम 200डिफ़ॉल्ट50
offsetinteger

How many rows to skip, for the next page.

कम से कम 0डिफ़ॉल्ट0
addressstring

Only the subscriptions delivered to this address. One the key does not reach lists nothing.

3 से 320 वर्ण

लौटाता है

A page of sender domains.

त्रुटियाँ

वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची

इनमें भी उपलब्ध

SDK
subscriptions.listDomains()
CLI
openemail subscriptions list-domains
MCP
listSubscriptionDomains

POST/subscriptions/domains/{domain}/unsubscribe

Unsubscribe from a whole domain

स्कोपthreads:writeमेल भेजता है

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/domains returns it.

अनुरोध बॉडी

binboolean

Also move every conversation from the senders to the Bin.

डिफ़ॉल्टfalse
addressstring

Only the subscriptions delivered to this address.

3 से 320 वर्ण

लौटाता है

What happened to each sender, counted.

त्रुटियाँ

वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची

इनमें भी उपलब्ध

SDK
subscriptions.unsubscribeDomain()
CLI
openemail subscriptions unsubscribe-domain
MCP
unsubscribeSubscriptionDomain

POST/subscriptions/{id}/unsubscribe

Unsubscribe from a sender

स्कोपthreads:writeमेल भेजता है

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 /subscriptions returns it.

अनुरोध बॉडी

binboolean

Also 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त्रुटि सूची

इनमें भी उपलब्ध

SDK
subscriptions.unsubscribe()
CLI
openemail subscriptions unsubscribe
MCP
unsubscribeSubscription

POST/subscriptions/{id}/move

Move what a sender sent

स्कोपthreads:writeडेटा बदलता है

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 /subscriptions returns it.

अनुरोध बॉडी

destinationstringआवश्यक

archive, bin or label.

इनमें से एक"archive""bin""label"
labelIdstring

The label to file under when destination is label.

null हो सकता है1 से 200 वर्ण
futureboolean

Also keep doing it to new mail from the sender, with a rule. Needs rules:write.

डिफ़ॉल्टtrue
ruleNamestring

A name for that rule.

null हो सकता हैअधिकतम 100 वर्ण

लौटाता है

How many conversations moved, and the rule.

त्रुटियाँ

वे त्रुटियाँ जो कोई भी ऑपरेशन लौटा सकता है400401403404422500त्रुटि सूची

इनमें भी उपलब्ध

SDK
subscriptions.move()
CLI
openemail subscriptions move
MCP
moveSubscription

POST/threads/{id}/unsubscribe

Unsubscribe from the sender of a thread

स्कोपthreads:writeमेल भेजता है

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 /threads returns 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त्रुटि सूची

इनमें भी उपलब्ध

SDK
threads.unsubscribe()
CLI
openemail threads unsubscribe
MCP
unsubscribeThread

ऑब्जेक्ट

DomainUnsubscribeResultobject

objectstring
इनमें से एक"domain_unsubscribe"
domainstring
unsubscribedinteger
skippedinteger

Senders that only offer a page.

failedinteger
binnedinteger

Subscriptionobject

objectstring
इनमें से एक"subscription"
idstring
senderEmailstring
senderNamestring
null हो सकता है
recipientstring

The address the mail arrives at.

statusstring
इनमें से एक"active""unsubscribed"
methodstring

How the sender lets you unsubscribe, or null when it gives no way.

null हो सकता हैइनमें से एक"one-click""email""link"
linkUrlstring

Its unsubscribe page, when it has one.

null हो सकता है
unreadinteger
recentinteger

Mail in the last 30 days.

totalinteger
sinceUnsubscribedinteger

Mail that still arrived after you unsubscribed.

lastSeenAtstring
फ़ॉर्मैटdate-time
unsubscribedAtstring
null हो सकता हैफ़ॉर्मैटdate-time
unsubscribedWithstring
null हो सकता हैइनमें से एक"one-click""email""link"
futureobject

The rule that keeps moving its new mail, when there is one.

null हो सकता है
ruleIdstring
destinationstring
इनमें से एक"archive""bin""label"
labelIdstring
null हो सकता है

SubscriptionDomainobject

objectstring
इनमें से एक"subscription_domain"
domainstring
namestring
sampleEmailstring

One sender address on the domain.

sendersinteger
unsubscribableinteger

Senders that can be unsubscribed without a person opening a page.

unreadinteger
recentinteger
totalinteger
sinceUnsubscribedinteger
lastSeenAtstring
फ़ॉर्मैटdate-time

SubscriptionDomainListobject

objectstring
इनमें से एक"list"
totalinteger
countsobject
activeinteger
unsubscribedinteger
hasMoreboolean

SubscriptionListobject

objectstring
इनमें से एक"list"
totalinteger

Rows that match, across every page.

countsobject
activeinteger
unsubscribedinteger
hasMoreboolean

SubscriptionMoveResultobject

objectstring
इनमें से एक"subscription_move"
subscriptionIdstring
movedinteger

Conversations moved.

ruleIdstring

The rule that keeps moving new mail.

null हो सकता है

UnsubscribeResultobject

objectstring
इनमें से एक"unsubscribe"
subscriptionIdstring
threadIdstring

Present when it was asked for through a thread.

methodstring
इनमें से एक"one-click""email""link"
urlstring

The page to open when method is link, since that one needs a person.

null हो सकता है
binnedinteger

Conversations moved to the Bin.