Source: https://cli.nylas.com/docs/commands/webhook-create

# nylas webhook create

The nylas webhook create command registers a URL to receive real-time notifications when email, calendar, or contact events occur. Specify trigger types like message.created, event.updated, or contact.deleted. Webhooks fire within seconds of the event, replacing polling-based sync. Real-time delivery for agent account inboxes also runs through this command — replaces the deprecated nylas inbound monitor.

## Usage

```bash
nylas webhook create --url URL --triggers TRIGGERS
```

## 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 |
| --url | Webhook URL |
| --triggers | Comma-separated trigger types |

## Examples

### Create webhook

```bash
nylas webhook create --url https://yourserver.com/webhook --triggers "message.created,event.updated"
```

### Subscribe to inbound mail for an agent account

```bash
nylas webhook create --url https://example.com/hook --triggers message.created
```

## Troubleshooting

### Migrating from nylas inbound monitor

Use nylas webhook create --triggers message.created to subscribe to real-time inbound events. There is no agent equivalent of the streaming-to-terminal mode; expose a local tunnel (cloudflared, ngrok) and point --url at it for development.

## Recommended guides

[Stop Your AI Agent From Going RogueSet inbound and outbound guardrails on AI agent email. Block phishing senders, archive replies, and contain prompt-injection escalation at the connector layer.](https://cli.nylas.com/guides/stop-ai-agent-going-rogue)

[Install Nylas Skills for AI Coding AgentsInstall nylas-cli and nylas-api skills in Claude Code, Cursor, Codex CLI, Windsurf, and 30+ AI coding agents with one command.](https://cli.nylas.com/guides/nylas-agent-skills)

[Create an AI Agent Email IdentitySet up a managed email identity for an AI agent. Send and receive from a real inbox in 2 minutes — no OAuth, no third-party mailbox.](https://cli.nylas.com/guides/create-ai-agent-email-identity)

[Build an AI Email Triage AgentBuild an AI agent that reads your inbox, classifies emails by urgency, drafts replies, and archives noise. Python + Nylas CLI + any LLM.](https://cli.nylas.com/guides/build-ai-email-triage-agent)

[Receive Email Without an SMTP ServerCreate a managed agent email account and process incoming messages via webhooks — no Postfix, no MX records. Uses the nylas agent surface (replaces the deprecated nylas inbound).](https://cli.nylas.com/guides/receive-inbound-email-cli)

[Extract OTP Codes from Email — Skip the InboxPull 2FA verification codes from email without opening your inbox. nylas otp get copies the code to your clipboard. Works with Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP.](https://cli.nylas.com/guides/extract-otp-codes-from-email)

[Give Your AI Coding Agent an Email AddressConnect Claude Code, Cursor, OpenAI Codex CLI, Windsurf, and OpenClaw to a real email account via MCP. Step-by-step setup for each tool using Nylas CLI.](https://cli.nylas.com/guides/give-ai-agent-email-address)

[Send Email from Linux/Manus Sandbox Without SMTPSend email from a Linux or Manus sandbox over HTTPS when SMTP ports 25, 465, and 587 are blocked. No Postfix or sendmail — Nylas CLI handles delivery.](https://cli.nylas.com/guides/send-email-manus-sandbox)

[Manus AI Email Research AgentUse Manus AI to deep-search your inbox, summarize email threads, extract decisions, and compile research — all powered by Nylas CLI email commands.](https://cli.nylas.com/guides/manus-email-research)

[Build an Email Support Agent with Manus AIBuild a Manus support agent that polls a support inbox, matches knowledge base articles, drafts replies, and routes risky tickets for human approval.](https://cli.nylas.com/guides/manus-email-support-agent)

[Reach Inbox Zero with Manus AIReach inbox zero with Manus AI. Triage unread email, categorize by urgency, draft replies, and archive — all via natural language and Nylas CLI.](https://cli.nylas.com/guides/manus-inbox-zero)

[Mail Manus: Automate Email from CLICompare Mail Manus forwarding with direct inbox access. Learn when to add the Nylas CLI Skill for search, sending, follow-ups, and calendar workflows.](https://cli.nylas.com/guides/mail-manus-email-automation)

[CI/CD Email Alerts with PowerShellSend build notifications, deployment reports, and test failure alerts from GitHub Actions, Azure DevOps, and Jenkins using PowerShell and Nylas CLI.](https://cli.nylas.com/guides/powershell-email-cicd)

[Create a Manus Skill: Email & Calendar WorkflowCreate a Manus Skill that installs Nylas CLI in the sandbox and teaches your agent email and calendar workflows via SKILL.md and setup scripts.](https://cli.nylas.com/guides/manus-ai-skills)

[E2E Email Testing with PlaywrightTest password reset, invitation, and verification emails end-to-end. Poll with Nylas CLI, verify content in Playwright, and click links. No Gmail config needed.](https://cli.nylas.com/guides/e2e-email-testing)

[Build an LLM Agent with Email & Calendar ToolsAdd email and calendar tools to your LLM agent using Nylas CLI subprocess commands. List messages, send email, and create events without writing API clients.](https://cli.nylas.com/guides/build-email-agent-cli)

Run `nylas webhook create --help` for full help output.
