Email to webhook, parsed to JSON
Send mail to an endpoint's mailhooks.cc address and webhooks.cc posts every email to your server as JSON. No mail server to run and no MIME to parse. Each request is signed with Standard Webhooks headers and retried until your server answers 2xx.
On every plan. Read the forwarding docs for the full payload and examples in Node and Python.
Set it up
- 1
Create an endpoint
Sign up free and create an endpoint. It receives email at its slug at mailhooks.cc.
- 2
Add your URL
In the endpoint's Settings, under Forwarding, pick Your server, enter your server's https URL and click Add destination. It gets a signing secret of its own, starting with whsec_; copy it into your handler.
- 3
Send a test delivery
Send test delivery posts the newest email, or a sample, to your URL once and shows the status, the time and the start of your server's answer.
- 4
Let the mail flow
The destination is on as soon as it is added: every email the endpoint receives is posted to your URL as JSON, usually within a second or two.
What your server receives
One POST per email. The body is the parsed message; the headers let you check that it came from webhooks.cc. Every copy of one email carries the same webhook-id, so a handler can skip a retry it already processed.
POST /hooks/email HTTP/1.1
Content-Type: application/json
webhook-id: msg_0b9e5f3a6c1d4f7e9a2b3c4d5e6f7a8b
webhook-timestamp: 1791450602
webhook-signature: v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=
{
"type": "email.received",
"timestamp": "2026-10-08T09:30:01.882Z",
"data": {
"id": "0b9e5f3a-6c1d-4f7e-9a2b-3c4d5e6f7a8b",
"address": "acme-support+billing@mailhooks.cc",
"tag": "billing",
"subject": "Question about invoice 2291",
"from": { "name": "Ines Duarte", "address": "ines@tidewater.app" },
"to": [{ "name": null, "address": "acme-support+billing@mailhooks.cc" }],
"text": "Hi, the invoice lists two seats but we have three...",
"html": "<div>Hi, the invoice lists two seats...</div>",
"codes": [],
"links": [],
"attachments": [
{ "filename": "invoice-2291.pdf", "contentType": "application/pdf", "size": 48211 }
],
"auth": { "spf": "pass", "dkim": "pass", "dmarc": "pass", "tls": "TLSv1_3" },
"headers": { "subject": "Question about invoice 2291", "...": "..." },
"test": false
}
}Shortened. The full JSON also carries the endpoint, cc and reply-to addresses, the date, the message id, the size and which parts were cut. codes and links are left out when the endpoint's owner turned off "Show codes and links found in emails".
Verify the signature
The signature is an HMAC-SHA256 of the id, the timestamp and the raw body, keyed with the destination's secret. The TypeScript SDK's verifyForwardedEmail checks it and the timestamp, then hands you the parsed email:
import { verifyForwardedEmail, WebhookVerificationError } from "@webhooks-cc/sdk";
export async function POST(request: Request) {
try {
const { data } = await verifyForwardedEmail(
await request.text(),
request.headers,
process.env.FORWARD_SECRET!
);
await handleInboundEmail(data); // your code
return new Response(null, { status: 204 });
} catch (error) {
if (error instanceof WebhookVerificationError) {
return new Response(error.message, { status: 401 });
}
throw error;
}
}The official Standard Webhooks libraries verify the same headers in Ruby, Java, PHP, Rust, C# and more, and the webhooks.cc Python and Go SDKs have the same check.
What people build with it
Handle replies and inbound requests
Give customers or a partner an address and turn what they send into tickets, comments or records in your app.
React to services that only send email
Some vendors notify by email and nothing else. Forward those messages and handle them like any other webhook.
Drive end-to-end tests
Let a test server receive the signup or login email as JSON, with the one-time code and the main link already picked out.
Feed email into a workflow or an agent
Post structured email to an automation, a queue or an AI agent without writing a MIME parser first.
Delivery and limits
- Any 2xx accepts a delivery; redirects are not followed
- 15 seconds for your server to answer
- 8 retries over about a day, then marked failed
- Every try logged, with a Redeliver button
- https URLs on public host names only
- Text and HTML up to 256 KB each; attachments as signed links or inline
- Every plan, Free included; up to 10 destinations per endpoint
- No extra quota: each email counted once when it arrived
Want orders, bookings or reports read out of each email and its CSV, Excel or PDF attachments first? That is what layouts do; see mailhooks.cc, the mail-first side of the same account.
Testing the emails your own app sends rather than handling inbound mail? See email testing
Email to webhook questions
Create a webhooks.cc endpoint and add your URL as a destination under Forwarding in its Settings. Every email sent to the endpoint's mailhooks.cc address is then posted to your URL as JSON, signed with Standard Webhooks headers.
The sender, recipients, subject, date, message id, the text and HTML parts, the new text of a reply without the quoted message, the one-time codes and links found in the email, the fields you named, the name, type and size of each attachment, the SPF, DKIM and DMARC results, and every header. It is the same JSON each email's JSON tab shows in the dashboard. The codes and links fields are left out when the endpoint's owner turned off "Show codes and links found in emails", so treat them as optional.
Yes. Name a value and say where it is, such as invoice from the subject with the pattern (INV-\d+), and every email carries it in its JSON as fields.invoice. A forwarding destination can then send only those values, in a JSON body you write, and only for emails whose value matches, which is what an email parser does. Patterns are RE2, so they run in time linear in the email.
Yes. A destination, the CLI's tunnel and the SDK can post a captured email the way Postmark's inbound webhook, SendGrid's Inbound Parse, a Mailgun route or CloudMailin's JSON format posts it, a Mailgun form signed with your own signing key, so the handler you already wrote runs against real mail. Postmark's and CloudMailin's shapes carry attachment contents when the email is stored; SendGrid's and Mailgun's forms carry their names only.
With Standard Webhooks headers: webhook-id, webhook-timestamp and webhook-signature, an HMAC-SHA256 of the id, the timestamp and the body with the destination's whsec_ secret. The webhooks.cc SDKs for TypeScript, Python and Go and the official Standard Webhooks libraries verify them.
A delivery that does not get a 2xx answer within 15 seconds is tried again after 30 seconds, 2 minutes, 10 minutes, 30 minutes, 1 hour, 3 hours, 6 hours and 12 hours, about a day in all. Each try is listed on the email with your server's status and the start of its answer, and you can redeliver by hand.
Yes, in the JSON, template, Postmark and CloudMailin formats: each destination sends them as signed download links (the default), inline as base64 up to 1 MB per delivery, or as names only. The SendGrid and Mailgun forms carry their names only.
No. Forwarding is on every plan, Free included, with up to 10 destinations per endpoint, and does not use your quota: each email already counted as one request when it arrived.
Not as a destination: its URL must be https on a public host name, and IP addresses, localhost and private networks are refused. For local work, run whk tunnel with your port: the CLI posts every email the endpoint receives to your machine as the same JSON, or in a mail provider's shape with --email-format.
Your first forwarded email
Sign up free, create an endpoint, add your URL and send it an email.
No credit card