Turn inbound email into signed webhooks.
AliasFleet email webhooks convert incoming messages for your aliases into real-time HTTPS POST requests. Every custom webhook delivery is signed with HMAC-SHA256, checked against replay windows, and filtered for private network SSRF targets before leaving the mail pipeline.
Built for reliable inbound automation
Route specific aliases or conditional rule matches directly to your backend workers, alert channels, or ticket queues without polling IMAP.
Five payload formats
Send parsed_json, metadata_only, Slack, Discord, or full RFC 5322 raw_mime (Business) payloads per endpoint.
Cryptographic signature verification
Validate requests with X-AliasFleet-Signature timestamps, v1 HMAC-SHA256 digests, and af_whsec_ rotating secrets.
Egress SSRF filtering
Every outbound webhook destination is checked before connection to reject RFC 1918 private subnets and cloud metadata IPs.
Delivery logs and test pings
Inspect HTTP status codes, response latency, and whd_ delivery IDs, or trigger /v1/webhooks/test during integration.
Verify webhook signatures in Node.js
Compute HMAC-SHA256 over the timestamp and raw unparsed request body, enforce the 300-second replay tolerance window, and compare digests in constant time.
import { NextResponse } from 'next/server';
import crypto from 'node:crypto';
export async function POST(req: Request) {
const sig = req.headers.get('x-aliasfleet-signature');
const secret = process.env.ALIASFLEET_WEBHOOK_SECRET;
if (!sig || !secret) {
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
}
const rawBody = await req.text();
const parts = Object.fromEntries(sig.split(',').map((kv) => kv.trim().split('=')));
const timestamp = Number.parseInt(parts.t ?? '', 10);
const receivedSig = parts.v1 ?? '';
if (!timestamp || Math.abs(Math.floor(Date.now() / 1000) - timestamp) > 300) {
return NextResponse.json({ error: 'Expired signature' }, { status: 401 });
}
const expected = crypto
.createHmac('sha256', secret)
.update(`${timestamp}.${rawBody}`)
.digest('hex');
const valid =
receivedSig.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(receivedSig, 'hex'), Buffer.from(expected, 'hex'));
if (!valid) {
return NextResponse.json({ error: 'Invalid signature' }, { status: 401 });
}
return NextResponse.json({ received: true });
}Content-Type: application/json
X-AliasFleet-Event: email.received
X-AliasFleet-Delivery: whd_9z8y7x6w5v4u3t2s
X-AliasFleet-Signature: t=1787652000,v1=9f83a21b4c7d0e9a8b7c6d5e4f3a...Email webhook limits by plan
Start with standard alias forwarding on Free, add HTTP and chat webhooks on Pro, or unlock raw MIME streaming and unlimited endpoints on Business.
| Capability | Free | Pro | Business |
|---|---|---|---|
| Active webhook endpoints | 0 | 2 endpoints | Unlimited |
| Supported payload formats | Not included | parsed_json, metadata_only, slack, discord | All 4 + raw_mime (RFC 5322) |
| Delivery log retention | Not included | 7 days | 30 days + CSV/JSON export |
| HMAC-SHA256 signing and secret rotation | Not included | Included | Included |
| Routing rule trigger (send_to_webhook) | Not included | Up to 20 rules | Unlimited rules |
Related email automation guides
Pair inbound webhooks with conditional routing filters or manage endpoints over the REST API.
Webhooks API reference
Endpoint schemas, delivery retries, Slack/Discord formats, and verification examples.
Email filtering and routing rules
Trigger webhooks selectively based on sender domain, subject, regex, or attachments.
Email Alias REST API
Manage webhook endpoints, aliases, and custom domains programmatically.
Email webhook questions
How AliasFleet delivers, signs, and scopes inbound email webhook requests.