Command

nylas email mark read

Mark an email as read.

Written by Qasim Muhammad Staff SRE

What does nylas email mark read do?

The nylas email mark read command sets the read/seen flag on a message by its ID. Combine with nylas email list --unread and a shell loop to mark all unread messages as read in one pass across Gmail, Outlook, Exchange, and IMAP accounts.

Usage

nylas email mark read <message-id> [grant-id]

Flags

FlagDescription
--jsonOutput as JSON
--no-colorDisable color output
--verbose(-v)Enable verbose output
--configCustom config file path
--help(-h)Show help for the command
--limitLimit results (most list commands)
--yes(-y)Skip confirmations

Examples

The nylas email mark read command sets the read/seen flag on a message by its ID.

Mark a single email as read

nylas email mark read msg_abc123

Mark all unread emails as read

nylas email list --unread --json | jq -r '.[].id' | while read id; do nylas email mark read "$id"; done

Example output

✓ Message marked as read
  Message ID: msg_abc123

Troubleshooting

Email marked read but still shows unread in provider

Some providers take a few seconds to sync. Wait and refresh your webmail client.

Message ID not found

Run nylas email list --unread --json to get valid unread message IDs.

Recommended guides

Run nylas email mark read --help for full help output.