Command
nylas agent account create
Create a managed agent email identity (provider=nylas).
Written by Qasim Muhammad Staff SRE
What does nylas agent account create do?
The nylas agent account create command provisions a managed email address such as user@myagent.nylas.email that can both send transactional mail and receive messages, with no OAuth handshake or third-party mailbox. Register the domain first with `nylas dashboard domains create <subdomain>.nylas.email --region <region>`, then pass --name to set a display name or --app-password to enable IMAP/SMTP for a standard mail client.
Usage
nylas agent account create <email>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 a top-level display name on the grant (1-256 characters) |
| --app-password | Set settings.app_password for IMAP/SMTP access |
Examples
Create an Agent Account on a free domain
nylas dashboard domains create myagent.nylas.email --region us
nylas agent account create user@myagent.nylas.emailCreate a support identity
nylas agent account create support@yourapp.nylas.email
# Provisions support@yourapp.nylas.email with provider=nylasCreate with a display name
nylas agent account create me@yourapp.nylas.email \
--name 'Support Bot'
# Sets a top-level name (display name) on the grantCreate with IMAP/SMTP credential
nylas agent account create me@yourapp.nylas.email \
--app-password 'ValidAgentPass123ABC!'
# Mail clients can now connect over IMAP/SMTPExample output
✓ Agent account created (agent_abc123)
Email: support@yourapp.nylas.email
Name: Support Bot
Provider: nylas
A default workspace and policy were created for this account.Troubleshooting
Name rejected
The display name must be 1 to 256 characters when set. It is a single top-level field (not split into first/last) and is omitted from the request entirely when you don't pass --name.
App password rejected
Must be 18-40 printable ASCII chars (no spaces) with at least one uppercase letter, one lowercase letter, and one digit.
Migrating from nylas inbound create <prefix>
Pass the full email address now (e.g., support@yourapp.nylas.email), not just the prefix.
Domain is not registered
Register a free domain first with `nylas dashboard domains create <subdomain>.nylas.email --region us` or use `--region eu` for an EU app.
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 create --help for full help output.