Skip to the documentation
CLI

nextmail notifications

Every command in this namespace, with its arguments, flags and examples.

Commands

What the bell in the app shows the person behind the key or the app: the invitations to join a workspace sent to their address, read or unread, open or answered, with the count of unread ones and a way to mark them read.

Every command here also takes the global flags, such as --json, --profile and --dry-run. See the global flags

nextmail notifications list

List your notifications

Scopesaccount:readNeeds a sign-inAliasesls

Usage

nextmail notifications list [flags]

Resolves one page of the notifications of the person behind the key or the app, newest first, as the bell in the app lists them, with unreadCount for every unread one on any page.

Today each notification is an invitation to join a workspace, sent to the address the person signs in with. It stays listed once it is answered, withdrawn or expires, and invitation.status says which: open, accepted, declined, withdrawn or expired. Answer an open one with account.acceptInvitation or account.declineInvitation and the id in invitation.id, which also marks it read. New kinds of notification will be added, and invitation is null on a kind that is about something else, so skip a kind you do not know.

Flags

--limit <n>

Page size, from 1 to 50. The server defaults to 20.

Default20
--cursor <value>

The nextCursor of the previous page. Leave it out for the first page.

Examples

nextmail notifications list
Print the raw JSON
nextmail notifications list --json

Also available in

API
GET /notifications
TypeScript
notifications.list()
Python
notifications.list()
Ruby
notifications.list
PHP
notifications->list
Go
Notifications.List
Java
notifications().list
C#
Notifications.ListAsync

nextmail notifications unread-count

Count your unread notifications

Scopesaccount:readNeeds a sign-in

Usage

nextmail notifications unread-count [flags]

Resolves how many notifications the person behind the key or the app has not read yet, the number on the bell in the app. It is cheaper than list, so poll this one and list only when it changes.

Examples

nextmail notifications unread-count
Print the raw JSON
nextmail notifications unread-count --json

Also available in

API
GET /notifications/unread-count
TypeScript
notifications.unreadCount()
Python
notifications.unread_count()
Ruby
notifications.unread_count
PHP
notifications->unreadCount
Go
Notifications.UnreadCount
Java
notifications().unreadCount
C#
Notifications.UnreadCountAsync

nextmail notifications mark-read

Mark notifications read

Scopesaccount:writeNeeds a sign-in

Usage

nextmail notifications mark-read <ids...> [flags]

Marks the notifications with these ids read, up to 100 at a time. An id that is already read, or that is not one of the person's notifications, is skipped, so marked counts only the ones that changed. Reading a notification never answers it: an open invitation stays open.

Arguments

<ids...>RequiredOne or more

Notification ids from list, 1 to 100 of them.

Examples

nextmail notifications mark-read notification_4c1b257a
Print the raw JSON
nextmail notifications mark-read notification_4c1b257a --json

Also available in

API
POST /notifications/read
TypeScript
notifications.markRead()
Python
notifications.mark_read()
Ruby
notifications.mark_read
PHP
notifications->markRead
Go
Notifications.MarkRead
Java
notifications().markRead
C#
Notifications.MarkReadAsync

nextmail notifications mark-all-read

Mark every notification read

Scopesaccount:writeNeeds a sign-in

Usage

nextmail notifications mark-all-read [flags]

Marks every notification of the person behind the key or the app read, as Mark all as read in the app does, and clears the number on the bell. Open invitations stay open and can still be answered.

Examples

nextmail notifications mark-all-read
Print the raw JSON
nextmail notifications mark-all-read --json

Also available in

API
POST /notifications/read-all
TypeScript
notifications.markAllRead()
Python
notifications.mark_all_read()
Ruby
notifications.mark_all_read
PHP
notifications->markAllRead
Go
Notifications.MarkAllRead
Java
notifications().markAllRead
C#
Notifications.MarkAllReadAsync

nextmail notifications clear

Clear your notifications

Scopesaccount:writeNeeds a sign-in

Usage

nextmail notifications clear [flags]

Removes the notifications of the person behind the key or the app, as Clear notifications in the app does. The notification of an invitation that is still open stays, because the invitation still waits for an answer, unless --decline-invitations is true: then every open invitation is declined first, as account.declineInvitation declines one, and its notification goes too. A declined invitation cannot be accepted, so only a new invitation brings the person in.

Flags

--decline-invitations

Decline every invitation that is still open first, so its notification goes too. False when left out, which keeps open invitations and their notifications.

Examples

nextmail notifications clear
Print the raw JSON
nextmail notifications clear --json

Also available in

API
POST /notifications/clear
TypeScript
notifications.clear()
Python
notifications.clear()
Ruby
notifications.clear
PHP
notifications->clear
Go
Notifications.Clear
Java
notifications().clear
C#
Notifications.ClearAsync