Skip to the documentation
API

Subscriptions

Every operation in this group: what it accepts, what it returns and the errors it can answer with.

Operations

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, with how much of their mail you read and which ones you rarely open. Keep the ones you want, unsubscribe from one sender, many at once or a whole domain, or move what they sent and keep moving what they send.

GET/subscriptions

List subscriptions

Scopesthreads:readReads

One row per sender and address it writes to, with how much mail it sent, how much of it is unread, what share of it you read and how much arrived in the last 30 days. suggested marks an active sender you rarely read: one that can be unsubscribed, sent at least 5 emails, wrote in the last 30 days and has 10% or less of its mail read. A key or an app limited to particular addresses lists only the subscriptions delivered to them.

Requires the threads:read scope.

Query parameters

statusstring

active lists what still arrives, kept the ones you chose to keep, unsubscribed what you left.

One of"active""kept""unsubscribed"Default"active"
qstring

Searches the sender name and address.

Up to 200 characters
sortstring

recent puts the newest mail first, most the senders with the most mail lately, emails the most mail overall, read the least read first, unread those with the most unread, name sorts by sender.

One of"recent""most""emails""read""unread""name"Default"recent"
suggestedboolean

Only the senders worth unsubscribing from: active, rarely read and still writing.

limitinteger

Rows per page.

At least 1At most 200Default50
offsetinteger

How many rows to skip, for the next page.

At least 0Default0
addressstring

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

3 to 320 characters

Returns

A page of subscriptions.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
subscriptions.list()
Python
subscriptions.list()
Ruby
subscriptions.list
PHP
subscriptions->list
Go
Subscriptions.List
Java
subscriptions().list
C#
Subscriptions.ListAsync
CLI
openemail subscriptions list
MCP
listSubscriptions

GET/subscriptions/domains

List subscriptions by domain

Scopesthreads:readReads

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.

Query parameters

statusstring

active lists what still arrives, kept the ones you chose to keep, unsubscribed what you left.

One of"active""kept""unsubscribed"Default"active"
qstring

Searches the sender name and address.

Up to 200 characters
sortstring

recent puts the newest mail first, most the senders with the most mail lately, emails the most mail overall, read the least read first, unread those with the most unread, name sorts by sender.

One of"recent""most""emails""read""unread""name"Default"recent"
suggestedboolean

Only the senders worth unsubscribing from: active, rarely read and still writing.

limitinteger

Rows per page.

At least 1At most 200Default50
offsetinteger

How many rows to skip, for the next page.

At least 0Default0
addressstring

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

3 to 320 characters

Returns

A page of sender domains.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
subscriptions.listDomains()
Python
subscriptions.list_domains()
Ruby
subscriptions.list_domains
PHP
subscriptions->listDomains
Go
Subscriptions.ListDomains
Java
subscriptions().listDomains
C#
Subscriptions.ListDomainsAsync
CLI
openemail subscriptions list-domains
MCP
listSubscriptionDomains

POST/subscriptions/domains/{domain}/unsubscribe

Unsubscribe from a whole domain

Scopesthreads:writeSends mail

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.

Path parameters

domainstringRequired

The sender domain, as GET /subscriptions/domains returns it.

Request body

binboolean

Also move every conversation from the senders to the Bin.

Defaultfalse
archiveboolean

Also archive every conversation from the senders. bin wins when both are true.

Defaultfalse
addressstring

Only the subscriptions delivered to this address.

3 to 320 characters

Returns

What happened to each sender, counted.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
subscriptions.unsubscribeDomain()
Python
subscriptions.unsubscribe_domain()
Ruby
subscriptions.unsubscribe_domain
PHP
subscriptions->unsubscribeDomain
Go
Subscriptions.UnsubscribeDomain
Java
subscriptions().unsubscribeDomain
C#
Subscriptions.UnsubscribeDomainAsync
CLI
openemail subscriptions unsubscribe-domain
MCP
unsubscribeSubscriptionDomain

POST/subscriptions/{id}/unsubscribe

Unsubscribe from a sender

Scopesthreads:writeSends mail

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, and with archive to the archive.

Requires the threads:write scope.

Path parameters

idstringRequired

The subscription, as GET /subscriptions returns it.

Request body

binboolean

Also move every conversation from the sender to the Bin.

Defaultfalse
archiveboolean

Also archive every conversation from the sender. bin wins when both are true.

Defaultfalse

Returns

How it was unsubscribed.

Errors

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.

The errors every operation can return400401403404429500Error catalog

Also available in

TypeScript
subscriptions.unsubscribe()
Python
subscriptions.unsubscribe()
Ruby
subscriptions.unsubscribe
PHP
subscriptions->unsubscribe
Go
Subscriptions.Unsubscribe
Java
subscriptions().unsubscribe
C#
Subscriptions.UnsubscribeAsync
CLI
openemail subscriptions unsubscribe
MCP
unsubscribeSubscription

POST/subscriptions/batch-unsubscribe

Unsubscribe from several senders

Scopesthreads:writeSends mail

Unsubscribes from each subscription in ids that can be unsubscribed without a person, with one-click or by email, and lists the rest. links holds the senders that only unsubscribe on their own page, with the page a person has to open; they stay active until somebody does. skipped holds the ones already unsubscribed or that give no way to unsubscribe, failed the ones whose sender did not accept it and missing the ids that are unknown or delivered to an address the key does not reach. With archive or bin, every conversation from the senders that were unsubscribed also moves. 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.

Request body

idsstring[]Required

1 to 100 subscription ids from GET /subscriptions. A repeated id counts once.

1 to 100 items
binboolean

Also move every conversation from the senders to the Bin.

Defaultfalse
archiveboolean

Also archive every conversation from the senders. bin wins when both are true.

Defaultfalse

Returns

What happened to each subscription.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
subscriptions.unsubscribeMany()
Python
subscriptions.unsubscribe_many()
Ruby
subscriptions.unsubscribe_many
PHP
subscriptions->unsubscribeMany
Go
Subscriptions.UnsubscribeMany
Java
subscriptions().unsubscribeMany
C#
Subscriptions.UnsubscribeManyAsync
CLI
openemail subscriptions unsubscribe-many
MCP
unsubscribeSubscriptions

POST/subscriptions/batch-keep

Keep subscriptions

Scopesthreads:writeChanges data

Marks active subscriptions as ones you want, so they move to kept and are never suggested again. kept: false puts kept subscriptions back to active. A subscription you unsubscribed from stays as it is and is listed in skipped.

Requires the threads:write scope.

Request body

idsstring[]Required

1 to 100 subscription ids from GET /subscriptions. A repeated id counts once.

1 to 100 items
keptboolean

true keeps active subscriptions, false puts kept ones back to active.

Defaulttrue

Returns

Which subscriptions changed.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
subscriptions.keep()
Python
subscriptions.keep()
Ruby
subscriptions.keep
PHP
subscriptions->keep
Go
Subscriptions.Keep
Java
subscriptions().keep
C#
Subscriptions.KeepAsync
CLI
openemail subscriptions keep
MCP
keepSubscriptions

POST/subscriptions/batch-move

Move what several senders sent

Scopesthreads:writeChanges data

Moves every conversation from each subscription in ids to the archive, the Bin or a label, as POST /subscriptions/{id}/move does for one. With future, the default, a rule per sender keeps doing it to new mail, which also needs rules:write.

Requires the threads:write scope.

Request body

idsstring[]Required

1 to 100 subscription ids from GET /subscriptions. A repeated id counts once.

1 to 100 items
destinationstringRequired

archive, bin or label.

One of"archive""bin""label"
labelIdstring

The label to file under when destination is label.

Can be null1 to 200 characters
futureboolean

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

Defaulttrue

Returns

How many conversations moved, and for which subscriptions.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
subscriptions.moveMany()
Python
subscriptions.move_many()
Ruby
subscriptions.move_many
PHP
subscriptions->moveMany
Go
Subscriptions.MoveMany
Java
subscriptions().moveMany
C#
Subscriptions.MoveManyAsync
CLI
openemail subscriptions move-many
MCP
moveSubscriptions

POST/subscriptions/{id}/move

Move what a sender sent

Scopesthreads:writeChanges data

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.

Path parameters

idstringRequired

The subscription, as GET /subscriptions returns it.

Request body

destinationstringRequired

archive, bin or label.

One of"archive""bin""label"
labelIdstring

The label to file under when destination is label.

Can be null1 to 200 characters
futureboolean

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

Defaulttrue
ruleNamestring

A name for that rule.

Can be nullUp to 100 characters

Returns

How many conversations moved, and the rule.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
subscriptions.move()
Python
subscriptions.move()
Ruby
subscriptions.move
PHP
subscriptions->move
Go
Subscriptions.Move
Java
subscriptions().move
C#
Subscriptions.MoveAsync
CLI
openemail subscriptions move
MCP
moveSubscription

POST/threads/{id}/unsubscribe

Unsubscribe from the sender of a thread

Scopesthreads:writeSends mail

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.

Path parameters

idstringRequired

The thread, as GET /threads returns it.

Returns

How it was unsubscribed.

Errors

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.

The errors every operation can return400401403404429500Error catalog

Also available in

TypeScript
threads.unsubscribe()
Python
threads.unsubscribe()
Ruby
threads.unsubscribe
PHP
threads->unsubscribe
Go
Threads.Unsubscribe
Java
threads().unsubscribe
C#
Threads.UnsubscribeAsync
CLI
openemail threads unsubscribe
MCP
unsubscribeThread

Objects

DomainUnsubscribeResultobject

objectstring
One of"domain_unsubscribe"
domainstring
unsubscribedinteger
skippedinteger

Senders that only offer a page.

failedinteger
binnedinteger
archivedinteger

Subscriptionobject

objectstring
One of"subscription"
idstring
senderEmailstring
senderNamestring
Can be null
recipientstring

The address the mail arrives at.

statusstring
One of"active""kept""unsubscribed"
methodstring

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

Can be nullOne of"one-click""email""link"
linkUrlstring

Its unsubscribe page, when it has one.

Can be null
unreadinteger
recentinteger

Mail in the last 30 days.

totalinteger
readPercentinteger

The share of its mail you read, from 0 to 100.

suggestedboolean

An active sender you rarely read, worth unsubscribing from.

sinceUnsubscribedinteger

Mail that still arrived after you unsubscribed.

lastSeenAtstring
Formatdate-time
unsubscribedAtstring
Can be nullFormatdate-time
unsubscribedWithstring
Can be nullOne of"one-click""email""link"
futureobject

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

Can be null
ruleIdstring
destinationstring
One of"archive""bin""label"
labelIdstring
Can be null

SubscriptionBatchKeepResultobject

objectstring
One of"subscription_batch_keep"
keptboolean

What was asked: keep, or put back to active.

updatedstring[]

Subscriptions that changed.

skippedstring[]

Subscriptions already in that state, or unsubscribed.

missingstring[]

Ids that are unknown or delivered to an address the key does not reach.

SubscriptionBatchMoveResultobject

objectstring
One of"subscription_batch_move"
movedinteger

Conversations moved, across every sender.

updatedstring[]

Subscriptions whose mail moved.

failedstring[]

Subscriptions that could not be moved.

missingstring[]

Ids that are unknown or delivered to an address the key does not reach.

SubscriptionBatchUnsubscribeResultobject

objectstring
One of"subscription_batch_unsubscribe"
unsubscribedstring[]

Subscriptions unsubscribed with one-click or by email.

linksobject[]

Senders that only unsubscribe on their own page, which a person has to open.

idstring
urlstring
skippedobject[]

Subscriptions left as they were, and why.

idstring
reasonstring
One of"already_unsubscribed""no_method"
failedstring[]

Subscriptions whose sender did not accept the request.

missingstring[]

Ids that are unknown or delivered to an address the key does not reach.

binnedinteger

Conversations moved to the Bin.

archivedinteger

Conversations archived.

SubscriptionDomainobject

objectstring
One of"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
readPercentinteger

The share of its mail you read, from 0 to 100.

sinceUnsubscribedinteger
lastSeenAtstring
Formatdate-time

SubscriptionDomainListobject

objectstring
One of"list"
totalinteger
countsobject
activeinteger
keptinteger
unsubscribedinteger
hasMoreboolean

SubscriptionListobject

objectstring
One of"list"
totalinteger

Rows that match, across every page.

countsobject
activeinteger
keptinteger
unsubscribedinteger
hasMoreboolean

SubscriptionMoveResultobject

objectstring
One of"subscription_move"
subscriptionIdstring
movedinteger

Conversations moved.

ruleIdstring

The rule that keeps moving new mail.

Can be null

UnsubscribeResultobject

objectstring
One of"unsubscribe"
subscriptionIdstring
threadIdstring

Present when it was asked for through a thread.

methodstring
One of"one-click""email""link"
urlstring

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

Can be null
binnedinteger

Conversations moved to the Bin.

archivedinteger

Conversations archived.