YOUR_RESOURCE_ID with a resource UUID from your test account. Create any named template, recipient, attachment, or JSON files first. Shell examples use Bash; examples that read JSON with jq need jq installed. Sends use sandbox mode.
Overview
The CLI provides tools for:- Creating local webhook listeners
- Triggering test events
- Forwarding events to local endpoints
- Debugging webhook signatures and payloads
Local Webhook Listener
Basic Usage
An existing webhook must be enabled to emit events. For a disabled test webhook, start its listener, then runahasend webhooks update YOUR_RESOURCE_ID --enable in another terminal. Disable it again before stopping the listener. A listener without --webhook-id creates an enabled temporary webhook.
Available Events
message.reception- Email received by AhaSendmessage.delivered- Email delivered to recipientmessage.transient_error- Temporary delivery failuremessage.failed- Permanent delivery failuremessage.bounced- Email bouncedmessage.suppressed- Email suppressedsuppression.created- New suppression addeddomain.dns_error- DNS resolution failuremessage.opened- Email opened by recipientmessage.clicked- Link clicked in email
Triggering Test Events
Development Testing
Event Simulation Scenarios
Integration Testing
Development Workflow
SSL Certificate Verification
Debugging
Output Options
Common Issues
Signature Verification Failed: The listener prints its signing secret when it starts. Store that secret in your local handler’s configuration; use the full string as the raw UTF-8 HMAC key. Do not base64-decode it. See signature verification. The command automatically generates a webhook secret using the Standard Webhooks headers and format, with the full secret as raw UTF-8 bytes Events Not Received: Check that the webhook URL is correct and the local server is running Connection Lost: The command handles disconnections with buffered event replay, automatically reconnecting when possibleBest Practices
- Start Simple: Test with single events before complex flows
- Use Sandbox Mode: Test with sandbox emails to avoid sending real messages
- Verify Signatures: Always validate webhook signatures in production
- Log Events: Keep detailed logs during development for debugging
- Test Error Cases: Simulate failures to ensure proper error handling

