01Keep the component in source control
Own the JSX, props, preview workflow, tests, and review history in the application that already knows the data.
Render the component in your Node runtime, then send the resulting HTML and text through one project-aware client. NoticeAPI never imports or executes your component.
The optional noticeapi/react entry needs Node 20 because its upstream renderer does. The core NoticeAPI SDK remains Node 18+.
The integration is a small handoff between code you own and an email record you can inspect.
01Own the JSX, props, preview workflow, tests, and review history in the application that already knows the data.
02The optional noticeapi/react entry calls the upstream renderer locally and returns HTML plus a text alternative by default.
03NoticeAPI receives the sender, recipient, subject, HTML, and text. It never imports or executes your component.
04The send returns an email id. Fetch it for status and recipient events, or configure signed delivery webhooks.
Install the SDK, React, and the upstream renderer. The optional helper turns the component into both message bodies before the send begins.
TypeScriptimport { NoticeAPI } from "noticeapi";
import { renderEmail } from "noticeapi/react";
import { ReceiptEmail } from "./emails/receipt";
const notice = new NoticeAPI(
process.env.NOTICEAPI_API_KEY!,
{ projectId: process.env.NOTICEAPI_PROJECT_ID },
);
const { html, text } = await renderEmail(
<ReceiptEmail order={order} />,
);
const { id } = await notice.emails.send(
{
from: "Acme <[email protected]>",
to: order.customerEmail,
subject: `Receipt ${order.number}`,
html,
text,
},
{ idempotencyKey: `receipt-${order.id}` },
);
const email = await notice.emails.get(id);Keep code execution with your application. Give NoticeAPI the finished message and responsibility for the delivery workflow.
Rendering ends before the network request. From that point on, use the same send result, stored record, and supported delivery events as any other NoticeAPI message.
emails.send() resolves with the NoticeAPI email id, provider, and provider message id when one is available.
emails.get(id) returns the stored sender, recipients, subject, delivery status, and time-ordered recipient events.
Configure an HTTPS endpoint when your app should receive supported delivery events without polling, and verify every HMAC signature.
JSON{
"id": "em_01J...",
"status": "sent",
"deliveryStatus": "delivered",
"events": [
{
"type": "delivered",
"recipient": "[email protected]",
"detail": "Mailbox accepted the message.",
"at": "2026-07-24T15:04:05.000Z"
}
]
}React Email is the code-owned path. Direct rendering and stored NoticeAPI templates remain first-class when they better match the team editing the message.
renderEmail() returns HTML and generates a text alternative by default. Set plainText: false only when you intentionally want HTML alone.
import { renderEmail } from "noticeapi/react"Already render React Email yourself? Keep that implementation and pass the resulting HTML and text strings to the normal send method.
import { render } from "@react-email/render"Choose NoticeAPI templates when content should be managed outside the codebase and sent later by template id with merge variables.
templateId: "tpl_receipt"Render the component locally, pass the HTML and text to one project-scoped client, and keep the resulting email id.