What do you need?
- An HTTPS endpoint
- A nofeb API key
Steps
-
1. Choose where mail comes in
Use a nofeb address, point your domain's MX at nofeb, or keep your current provider and forward with your inbound token.
-
2. Subscribe
Scope is required: organization, pod or one inbox.
Create the webhook curl -X POST https://api.nofeb.com/v1/webhooks -H "Authorization: Bearer $NOFEB_API_KEY" -H 'content-type: application/json' \ -d '{"url": "https://example.com/nofeb", "scope": "inbox", "inbox_id": "inb_…", "events": ["message.received"]}' -
3. Verify and fetch
Verify the signature on the raw body, then read the message with its extracted fields.
A handler (TypeScript) import { Nofeb, verifyWebhook } from "@nofeb/sdk"; const nf = new Nofeb(); export async function POST(req: Request) { const event = await verifyWebhook(await req.text(), req.headers, process.env.NOFEB_WEBHOOK_SECRET!); if (event.type === "message.received") { const m = await nf.messages.get(event.data.message_id); await handle(m.reply_text, m.otps, m.attachments); } return new Response(null, { status: 204 }); } -
4. Or pull instead
Workers behind a firewall can read the same events oldest first from GET /v1/events with a cursor.
-
5. Or hold a stream open
A live client can open a WebSocket to GET /v1/stream (subprotocol
nofeb.v1) and receive the same event envelopes in feed order as they happen. Every message carries a feed cursor, so a client that reconnects with?cursor=resumes with no gap and no duplicates.
Frequently asked questions
How do I receive email as a webhook without a mail server?
Give the address to senders (a nofeb inbox or your domain with its MX at nofeb) and subscribe to message.received. nofeb runs the receiving server, stores the message and calls your endpoint.
What does the webhook contain?
The event names the message and inbox. Fetch the message for its bodies, reply_text, safe_body, otps, links, attachments with extracted text, headers and, for mail nofeb's MX received, the security verdict.
What if my endpoint is down?
Deliveries are retried and every attempt is kept in a delivery log. The event feed holds the same events, so a consumer can catch up from its last cursor.
Status of everything on this page
Every capability named above, with its status as reconciled against the engine.
| Capability | What it does | Status |
|---|---|---|
| Signed webhooks with required scope | Standard Webhooks signatures, retries and a delivery log. Scope (organization, pod or inbox) is required, so a subscription never silently widens to everything. | Shipped |
| Durable event feed | A pull feed of every event, oldest first after a cursor, for consumers that cannot receive webhooks. | Shipped |
| Realtime stream | A WebSocket stream of the same events as webhooks and the feed, in order, resumable from a cursor with no gap and no duplicates, and filtered by inbox, pod or event type within the credential's own reach. | Shipped |
| Inbound mail server that checks mail at the door | nofeb's own MX receives mail for the shared domain and your custom domains, with STARTTLS. It checks every recipient before accepting any data, verifies SPF, DKIM, ARC and DMARC, and scans for spam and viruses before it answers. Mail that fails a DMARC reject policy, carries a virus or is clearly spam is refused during delivery instead of bounced later; likely spam and DMARC-quarantined mail is filed into Junk. Every message carries a security verdict with its authentication, spam, virus and TLS results. | Shipped |
| Inbound from the provider you already use | Receive through Cloudflare Email Routing with an Email Worker on your own zone, a Postmark inbound stream, a Mailgun route, SendGrid Inbound Parse, or any service that can POST a raw message. Each path is authenticated by your organization's inbound token, which you can rotate at any time, and delivers only to your own inboxes and verified domains. | Shipped |
| Reply extraction | Each message carries its new text with quoted history and signature removed. | Shipped |
| safe_body for untrusted mail | The message's new text with zero-width and direction-altering characters, hidden HTML and forgeable quoted history removed, wrapped in a provenance header that tells the model whose words these are. | Shipped |
| Attachment text | Attachments are listed with their extracted text and can be downloaded byte-exact. | Shipped |