The first webhook integration I ever built failed before it received a single notification. The handler was solid — JSON parsing, logging, the lot — but the subscription itself showed up as failed seconds after I created it. The reason turned out to be boring: my endpoint was http://localhost:3000, and the platform calling it lives on the internet, where my laptop does not. Every email-agent developer hits some version of this on day one, so here's the local development loop that actually works.

The setup: you're building an agent on an Agent Account — a hosted mailbox your app owns, currently in beta — and inbound mail fires a message.created webhook you need to handle. The webhook URL must be public HTTPS, because Nylas calls it from the internet within 10 seconds to verify it. Localhost fails that check by definition.

Step 0: A mailbox to develop against

You need an address that mail can actually land on. The trial-domain route means no DNS work at all: register a *.nylas.email subdomain from the Dashboard, then mint an account on it:

nylas agent account create test@your-application.nylas.email