Inbound

Inbound Resend

@dsar/inbound-resend accepts Resend email.received webhook events and maps them into canonical DSAR request capture input. Emails sent to configured addresses are automatically verified, routed, and captured as DSAR requests.

Installation

Package managerCommand
npmnpm install @dsar/inbound-resend
pnpmpnpm add @dsar/inbound-resend
yarnyarn add @dsar/inbound-resend
bunbun add @dsar/inbound-resend

Setup

  1. Configure Resend inbound emails — set up a receiving domain in Resend and point the webhook to your DSAR instance.

  2. Create the adapter:

  1. Register with the backend:

Webhook endpoint: POST /webhooks/inbound/resend

Required headers: svix-id, svix-timestamp, svix-signature

Configuration

OptionDefaultDescription
webhookSecretResend webhook secret for Svix signature verification (required)
apiKeyResend API key (needed when fetchEmailContent is enabled)
fetchEmailContentfalseFetch plain text / HTML body via Resend receiving API
routeMapRecipient address routing map
defaultRouteFallback route when no recipient match found

Intake Mapping

FieldValue
jurisdictionFrom recipient route resolution
intakeSource.typeinbound_email
intakeSource.receivedAtAuthoritative email timestamp
intakeSource.rawContextRefResend email_id or message_id
requestor.emailParsed sender email

Idempotency

Idempotency key format: inbound-resend:{sourceId}:{tenantId}:{workspaceId|*}

Replayed webhook deliveries return the original request ID.

Failure Modes

  • Invalid signature or malformed payloadREQUEST_VALIDATION_FAILED
  • Missing recipient route and no default routeREQUEST_VALIDATION_FAILED
  • Non-DSAR intent — accepted with status: ignored_non_dsar

Related