Command
nylas webhook test payload
Generate a sample webhook payload.
Written by Qasim Muhammad Staff SRE
What does nylas webhook test payload do?
The nylas webhook test payload command prints a deterministic sample webhook payload for a trigger type such as message.created or event.created. Use it to create fixtures for local tests, CI replay, and parser validation before production events arrive.
Usage
nylas webhook test payload [trigger-type] [--json]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 |
| --trigger | Trigger type to generate when not passed positionally |
| --json | Output as JSON |
Examples
Generate a message.created payload
nylas webhook test payload message.created --jsonSave a fixture
nylas webhook test payload event.created --json > event.created.jsonExample output
{
"type": "message.created",
"data": {
"object": {
"id": "message_abc123",
"grant_id": "grant_abc123",
"subject": "Welcome"
}
}
}Troubleshooting
Unknown trigger type
Run nylas webhook triggers to list supported trigger types, then pass one of those values positionally or with --trigger.
Recommended guides
Microsoft Graph Change Notifications
Microsoft Graph change notifications for mail and calendar: the subscription lifecycle, the validation token handshake, the 7-day expiry, and renewal.
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.
Sync Contacts Across Gmail and Outlook
Read contacts from Gmail and Outlook with one tool, deduplicate them by email, and get change notifications — without building a sync engine yourself.
Track Email Opens, Clicks, and Replies
Send tracked email and receive open, click, and reply events over webhooks from the terminal. Verify the signatures, and learn why email open rates overcount.
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.
Automate Sales Follow-Up Emails (CLI)
Run a sales follow-up cadence from the terminal: send tracked touches, read replies on a schedule, and stop the sequence on the thread.replied webhook.
Run nylas webhook test payload --help for full help output.