Command
nylas agent account update
Update a managed agent account's display name or IMAP/SMTP app password.
Written by Qasim Muhammad Staff SRE
What does nylas agent account update do?
The nylas agent account update command modifies an existing managed agent account (provider=nylas). Use --name to set the top-level display name and --app-password to add or rotate the IMAP/SMTP credential. Look up the account by grant ID or email, or omit the identifier to update the resolved local nylas grant. At least one of --name or --app-password is required.
Usage
nylas agent account update [id|email] (--name NAME | --app-password PW)Flags
| Flag | Description |
|---|---|
| --json | Output as JSON |
| --no-color | Disable color output |
| --verbose(-v) | Enable verbose output |
| --config | Custom config file path |
| --help(-h) | Show help for the command |
| --limit | Limit results (most list commands) |
| --yes(-y) | Skip confirmations |
| --name | Set the top-level display name (1-256 characters); omit to leave it unchanged |
| --app-password | Add or rotate settings.app_password for IMAP/SMTP access |
Examples
Rename an agent account
nylas agent account update me@yourapp.nylas.email \
--name 'Support Bot'Rotate the IMAP/SMTP app password
nylas agent account update 12345678-1234-1234-1234-123456789012 \
--app-password 'ValidAgentPass123ABC!'Update the resolved local grant
nylas agent account update --app-password 'ValidAgentPass123ABC!' --jsonExample output
✓ Agent account updated (agent_abc123)
Email: support@yourapp.nylas.email
Name: Support Bot
App password rotatedTroubleshooting
Nothing to update
Pass at least one of --name or --app-password. With no flags the command has no change to apply.
Display name was cleared after an update
The grant update replaces the full record, so the CLI re-sends the existing name when you don't pass --name. Clearing a name back to empty is not supported by the grant API.
Name rejected
The display name must be 1 to 256 characters. Omit --name to leave the current name unchanged.
Recommended guides
Build a Mastra Email Agent
Give a Mastra TypeScript agent email by wrapping the Nylas CLI as a createTool — one subprocess call, JSON in and out, across Gmail, Outlook, and more.
Add Email Sync to Your App Without IMAP
Skip per-mailbox IMAP IDLE connections. Use webhooks for push and on-demand reads for backfill, prototyped from the terminal — and know when IMAP still wins.
Send OTP and 2FA Codes by Email
Generate a cryptographically secure one-time code and send it by email from the terminal — no SMTP. Test the full round trip and learn email OTP's limits.
Build a Transactional Email Agent
Send receipts, confirmations, and alerts from a dedicated agent account — DKIM-signed, idempotent, and rate-capped by a workspace policy, no SMTP relay.
Trigger Agents on Inbound Email with Webhooks
Replace cron polling with webhooks: register a message.created hook so your agent account wakes the agent the instant mail arrives, signature-verified.
Build an Email Digest Agent
Send an opt-in digest to a subscriber group from an agent account — resolve the recipient list from contacts, honor unsubscribes, and send on a schedule.
Run nylas agent account update --help for full help output.