webhooks

Command-line tools for creating and managing Nylas notification destinations, which deliver real-time events such as new messages to an application. They also support webhook testing, signature checks, secret rotation, and Google Pub/Sub destinations.

In plain words
What is it for?
Use them to list, create, update, and remove webhooks; verify signed event payloads; rotate webhook secrets; and test event delivery locally or through Pub/Sub.
Why use it?
They remove the need to build separate setup and verification commands for receiving Nylas events. A local server and optional public tunnel help test deliveries during development.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/nylas/cli/webhooks
Clone the repo
git clone --depth 1 https://github.com/nylas/cli
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,299 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03299
Opus 5 $0.00000 $0.01649
Sonnet 5 $0.00000 $0.00660
Haiku 4.5 $0.00000 $0.00330

Measured 2d ago against content hash 14ed56cf6602, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

webhooks scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

# Skip the prompt and run loopback-only (useful for local curl tests
docs/commands/webhooks.md · 559 lines

How it starts

The opening of the file, as written. The whole thing — 559 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Webhook Management

Create and manage Nylas notification destinations for real-time event delivery.

Quick Reference

nylas webhook list
nylas webhook create --url https://example.com/webhook --triggers message.created
nylas webhook rotate-secret <webhook-id> --yes
nylas webhook verify --payload-file body.json --signature <sig> --secret <secret>

nylas webhook pubsub list
nylas webhook pubsub create --topic projects/PROJ/topics/TOPIC --triggers message.created
nylas webhook pubsub show <channel-id>
nylas webhook pubsub update <channel-id> --status inactive
nylas webhook pubsub delete <channel-id> --yes

Built-in Webhook Server

Start a local webhook server for development and testing:

# Interactive: detects cloudflared and prompts to enable a public tunnel.
# (Nylas can't deliver webhooks to localhost, so a tunnel is needed to
# receive real events.)
nylas webhook server

# Skip the prompt and run loopback-only (useful for local curl tests
# or non-interactive environments)
nylas webhook server --no-tunnel

# Start with public tunnel (cloudflared required) + signature verification
nylas webhook server --tunnel cloudflared --secret your-webhook-secret

# Custom port with a tunnel
nylas webhook server --port 8080 --tunnel cloudflared --secret your-webhook-secret

# Auto-register: create the Nylas webhook for the tunnel URL, fetch its
# secret automatically, and delete it again on exit (no manual setup)
nylas webhook server --tunnel cloudflared --register --triggers message.created

When --tunnel is set, --secret is required (or pass --allow-unsigned to opt out explicitly). The interactive preflight will prompt for a secret inline when you accept the tunnel; leaving it empty opts into unsigned mode.

Auto-registration (--register): the quick-tunnel URL changes on every restart, so registering it by hand is tedious. --register does it for you: after the tunnel comes up the CLI creates a Nylas webhook pointing at the live URL, pulls back the signing secret into memory (so signature verification is on without you copying anything), and deletes the webhook when the server stops. A stale-webhook sweep on start also removes any auto-registered webhook left behind by a previous hard kill. Choose the events with --triggers (comma-separated or repeated); you'll be prompted if it's omitted on a terminal. With --register you do not pass --secret — it's fetched from Nylas. --register implies --tunnel cloudflared and cannot be combined with --secret, --allow-unsigned, or --no-tunnel.

Read the full file on GitHub · 559 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 559 lines · 0 tokens per session scan A 14ed56cf6602

Subscribe to this mod's changes

webhooks is a command published in the GitHub repository nylas/cli (68 stars, last pushed 14d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,299 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.