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

# nylas webhook verify

Verify a webhook signature locally.

Written by [Qasim Muhammad](https://cli.nylas.com/authors/qasim-muhammad) Staff SRE

Published February 13, 2026

Updated June 21, 2026

## What does nylas webhook verify do?

The nylas webhook verify command validates a webhook payload against a signature and secret. Use --payload-file for a saved raw body, --payload for inline JSON, --signature for the received signature header, and --secret for the webhook signing secret.

## Usage

```bash
nylas webhook verify --payload-file PAYLOAD.json --signature SIG --secret SECRET
```

## 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 |
| --payload | Inline webhook payload JSON |
| --payload-file | Path to a file containing the raw webhook payload |
| --signature | Webhook signature header value |
| --secret | Webhook signing secret |

## Examples

The nylas webhook verify command validates a webhook payload against a signature and secret.

### Verify a saved payload

```bash
nylas webhook verify \
  --payload-file message.created.json \
  --signature "$NYLAS_SIGNATURE" \
  --secret "$NYLAS_WEBHOOK_SECRET"
```

### Verify inline JSON

```bash
nylas webhook verify \
  --payload '{"type":"message.created"}' \
  --signature "$NYLAS_SIGNATURE" \
  --secret "$NYLAS_WEBHOOK_SECRET"
```

## Example output

```text
✓ Signature valid
  The payload matches the x-nylas-signature header value.
```

## Troubleshooting

### Signature mismatch

Verify against the exact raw request body. Middleware that parses and reserializes JSON can change bytes and invalidate the signature.

## Related commands

[nylas webhook createCreate a webhook for real-time event notifications.](https://cli.nylas.com/docs/commands/webhook-create)

[nylas webhook deleteDelete an existing webhook by ID.](https://cli.nylas.com/docs/commands/webhook-delete)

[nylas webhook listList all webhooks.](https://cli.nylas.com/docs/commands/webhook-list)

[nylas webhook pubsub createCreate a Pub/Sub channel](https://cli.nylas.com/docs/commands/webhook-pubsub-create)

[nylas webhook pubsub deleteDelete a Pub/Sub channel](https://cli.nylas.com/docs/commands/webhook-pubsub-delete)

[nylas webhook pubsub listList Pub/Sub channels](https://cli.nylas.com/docs/commands/webhook-pubsub-list)

## Recommended guides

[Microsoft Graph Change NotificationsMicrosoft Graph change notifications for mail and calendar: the subscription lifecycle, the validation token handshake, the 7-day expiry, and renewal.](https://cli.nylas.com/guides/microsoft-graph-change-notifications)

[Add Email Sync to Your App Without IMAPSkip 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.](https://cli.nylas.com/guides/add-email-sync-without-imap)

[Sync Contacts Across Gmail and OutlookRead contacts from Gmail and Outlook with one tool, deduplicate them by email, and get change notifications — without building a sync engine yourself.](https://cli.nylas.com/guides/sync-contacts-gmail-outlook)

[Track Email Opens, Clicks, and RepliesSend tracked email and receive open, click, and reply events over webhooks from the terminal. Verify the signatures, and learn why email open rates overcount.](https://cli.nylas.com/guides/track-email-opens-replies-cli)

[Send OTP and 2FA Codes by EmailGenerate 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.](https://cli.nylas.com/guides/send-otp-email-cli)

[Microsoft Graph Mailbox Agent Best PracticesLeast-privilege Graph scopes, throttling limits, and change notifications for an AI agent that reads and writes an Outlook mailbox — without an Azure app.](https://cli.nylas.com/guides/microsoft-graph-mailbox-agent-best-practices)

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