Norq

Resend

Resend is a built-in Norq email provider. It builds requests for the POST https://api.resend.com/emails (single send) and POST https://api.resend.com/emails/batch (batch up to 100) endpoints.

Configuration

providers:
  resend:
    config:
      api_key: ${RESEND_API_KEY}
      from: noreply@example.com
 
      # Optional
      from_name: "Acme"               # rendered as `Acme <noreply@example.com>`
      reply_to: support@acme.com      # scalar OR list
      # reply_to:
      #   - support@acme.com
      #   - billing@acme.com
routing:
  email: resend

api_key and from are required. from_name and reply_to are optional.

Environment-variable fallback

If providers.resend is not declared, Norq registers Resend when these env vars are set:

Var Required
NORQ_RESEND_API_KEY yes
NORQ_RESEND_FROM_ADDRESS yes

Capabilities

  • Channels: email only.
  • Batching: up to 100 messages per request via /emails/batch. The SDK auto-flushes at this limit when calling batch().
  • Idempotency: real server-side dedup via the Idempotency-Key header. The SDK auto-generates a UUID v4 when the caller does not supply one. For batch sends, Resend accepts a single batch-level key — the first item’s key (if any) is lifted to the batch header.
  • Attachments: up to 40 MB total across a single request. Inline images (disposition: inline + content_id) are supported for cid: references in HTML.
  • reply_to: accepts scalar or list. The list form is forwarded as-is to Resend, which sends to all addresses.
  • CLI: works. Resend uses Bearer auth and plain HTTP/1.1, so the norq CLI binary can deliver email without any special dependencies.

Request shape

  • Body: application/json.
  • Auth: HTTP Authorization: Bearer <api_key> (sent via Auth::Bearer; the SDK executor injects the header).
  • Single endpoint: POST https://api.resend.com/emails.
  • Batch endpoint: POST https://api.resend.com/emails/batch (array body).
  • Success: 200. Norq extracts the message ID from $.id.
  • Retry: defaults — 429 + 5xx, 2 retries, 500ms backoff.