Conduit
Conduit
Docsllms.txtHostingGitHubIntroduction

Getting Started

OverviewInstall ConduitMCP SetupYour First AppStart with AI

Learn

ArchitectureClient vs Admin APIConfiguration

Modules

OverviewAuthenticationAuthorizationDatabaseStorageCommunicationsChatRouterFunctions

Guides

Next.js IntegrationReBAC Team ScopingGitOps State Export

Deployment

Deployment OverviewDocker ComposeKubernetes and HelmLocal from SourceContainer Images

Reference

CLI ReferenceClient APIAdmin APIEnvironment VariablesMCP Tools

Resources

Migration v0.16 → v0.17Legacy DocumentationChangelogFAQGlossaryContributing

Communications

Unified email, SMS, and push — one module, three channels, orchestrated delivery.

Your app needs to reach users on email, push, and SMS — without operating three separate modules, credential sets, and send paths. The communications module is the unified messaging layer: one config namespace, channel-specific Admin API routes under /email, /push, and /sms (not /pushNotifications), plus orchestration for multi-channel and fallback delivery.

In v0.17, legacy email, sms, and push-notifications modules consolidate here. Existing grpcSdk.email, grpcSdk.pushNotifications, and grpcSdk.sms calls continue to work; new integrations can use grpcSdk.communications for orchestrated sends. Sending from application runtime stays server-side — never admin credentials in the browser.

Use cases

Transactional email

Welcome emails, receipts, password resets via Handlebars EmailTemplate

Push notifications

FCM/OneSignal device tokens registered from apps; send via Admin API or workers

SMS & 2FA

Twilio Verify, AWS SNS, or MessageBird for verification codes and alerts

Multi-channel orchestration

Broadcast to email + push + SMS, or fallback chains when a channel fails

Unified templates

CommunicationTemplate documents coordinate copy across channels for GitOps export

Capabilities

  • Email (SMTP, SendGrid, Mailgun, SES, Mandrill, MailerSend)
  • Push (Firebase, OneSignal, Amazon SNS)
  • SMS (Twilio, AWS SNS, MessageBird)
  • Handlebars email templates (EmailTemplate CRUD)
  • Multi-channel CommunicationTemplate schema + state export
  • Device token registration & in-app inbox
  • Delivery history (email, SMS records)
  • Orchestration: BEST_EFFORT / ALL_OR_NOTHING broadcast
  • Fallback chains with per-channel timeouts
  • Legacy grpc-sdk aliases (email, pushNotifications, sms)

Example: Template, email send, and fallback

Walkthrough

  1. Provision a WelcomeEmail EmailTemplate via Admin API POST /email/templates (deploy time)
  2. From server-side code, POST /email/send with templateName and variables
  3. App registers FCM token via Client API POST /token after user login
  4. For critical alerts, POST /send/fallback with an ordered channel chain
Create email template (Admin API — deploy time)
curl -X POST http://localhost:3030/email/templates \
-H "Authorization: Bearer ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"WelcomeEmail","subject":"Welcome {{name}}","body":"<p>Hi {{name}}, welcome aboard.</p>"}'
Send email (Admin API — server-side only)
curl -X POST http://localhost:3030/email/send \
-H "Authorization: Bearer ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","templateName":"WelcomeEmail","variables":{"name":"Alex"}}'
Fallback chain (email → SMS)
curl -X POST http://localhost:3030/send/fallback \
-H "Authorization: Bearer ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "fallbackChain": [
    { "channel": "email", "timeout": 5000 },
    { "channel": "sms", "timeout": 3000 }
  ],
  "recipient": "user@example.com",
  "subject": "Security alert",
  "body": "Suspicious sign-in detected",
  "variables": { "code": "482910" }
}'

How it works

Unified module, channel-scoped Admin paths

One communications module owns all three channels. Admin routes register at the router root — there is no /communications prefix:

PrefixPurpose
/email/*Send, templates, delivery history, resend
/push/*Send notifications, manage device tokens — not /pushNotifications
/sms/*Send SMS, delivery history
/send/*Orchestrator — multi-channel broadcast and fallback

Config nests push settings under pushNotifications (legacy key name); Admin API paths use /push.

API surfaces

LayerRole
Client APIDevice token registration, in-app notification inbox (router root, no prefix)
Admin APISend email/push/SMS, template CRUD, delivery history, orchestration
gRPC / grpc-sdkServer-side sending from custom modules (grpcSdk.email, grpcSdk.communications, …)

Legacy grpc-sdk clients (grpcSdk.email, grpcSdk.pushNotifications, grpcSdk.sms) route to communications automatically.

Templates: EmailTemplate vs CommunicationTemplate

EmailTemplate — email-only Handlebars templates. Full Admin CRUD at /email/templates. Variables are auto-extracted from {{placeholders}} in subject and body on create. Reference by templateName when calling POST /email/send or grpcSdk.email.sendEmail.

FieldPurpose
nameUnique identifier — used as templateName when sending
subject, bodyHandlebars strings
variablesAuto-derived from {{…}} placeholders
senderOptional override sender
externalManagedSync with SendGrid/Mailgun provider templates

CommunicationTemplate — unified multi-channel template stored in the database. One document covers every channel the message uses:

FieldPurpose
nameUnique template identifier
channels['email', 'push', 'sms'] — which channels this template serves
email{ subject, body, sender? } — Handlebars in subject/body
push{ title, body } — {{variable}} interpolation
sms{ message } — {{variable}} interpolation
variablesDeclared variable names shared across channels

CommunicationTemplate documents are exportable/importable via state export (communicationTemplates resource type). Provision at deploy time alongside EmailTemplates.

For EmailTemplate, use Admin REST (POST /email/templates) or MCP post_email_templates. For CommunicationTemplate, prefer GitOps state import or direct database provisioning today. gRPC RegisterCommunicationTemplate is the orchestrator registration hook (server-side grpc-sdk only); it currently returns a minimal placeholder response — full unified Admin REST CRUD for CommunicationTemplate is not exposed yet.

Sending with templateName

PathtemplateName behavior
POST /email/sendResolves EmailTemplate by name; compiles Handlebars with variables. Omit only when providing inline subject + body.
grpcSdk.email.sendEmail(templateName, …)Same resolution as Admin API
POST /send/multiple, POST /send/fallbackInline subject, body, variables per channel — no templateName lookup on REST
gRPC SendToMultipleChannels, SendWithFallbackAccept templateName in the proto for CommunicationTemplate resolution
POST /push/send, POST /sms/sendInline title/body or message — no template lookup
// Email — template by name (server-side only)
await grpcSdk.email!.sendEmail("WelcomeEmail", {
  email: "user@example.com",
  variables: { name: "Alex" },
});

// Orchestrator — multi-channel broadcast
await grpcSdk.communications!.sendToMultipleChannels(
  ["email", "push"],
  "BEST_EFFORT",
  {
    recipient: "user@example.com",
    subject: "Order shipped",
    body: "Your order {{orderId}} is on the way",
    variables: { orderId: "ORD-42" },
  }
);

Orchestration

The orchestrator coordinates delivery across channels through two Admin API entry points:

Admin routeStrategyBehavior
POST /send/multipleBEST_EFFORT or ALL_OR_NOTHINGParallel send to listed channels; ALL_OR_NOTHING fails if any channel fails
POST /send/fallbackOrdered chainTry each channel in sequence with per-step timeout (ms) until one succeeds

POST /send/multiple returns { successCount, failureCount, results[] }. POST /send/fallback returns { successfulChannel, messageId, attempts[] }.

Orchestration config (retryAttempts, retryDelay, timeout, fallbackTimeout) lives under communications.orchestration.

Migration from v0.16

Standalone email, sms, and push-notifications modules are deprecated. Communications is a drop-in replacement:

  1. Deploy — register Communications instead of three separate modules.
  2. Config — nest legacy keys under communications (example below).
  3. Code — existing grpcSdk.email, grpcSdk.pushNotifications, grpcSdk.sms calls continue unchanged.
  4. MCP — use ?modules=communications or aliases ?modules=email,push,sms. push-notifications is not a valid alias.
communications:
  active: true
  email:
    active: true
    transport: sendgrid
    sendingDomain: example.com
    transportSettings:
      sendgrid:
        apiKey: "…"
  pushNotifications:   # config key — Admin paths use /push
    active: true
    providerName: firebase
    firebase:
      projectId: "…"
  sms:
    active: true
    providerName: twilio
    twilio:
      accountSID: "…"
      authToken: "…"
  orchestration:
    retryAttempts: 3
    fallbackTimeout: 5000

On first boot, communications can auto-merge legacy top-level email, pushNotifications, and sms config into the unified namespace when channel values still match defaults. Legacy gRPC service names are preserved on the unified Communications gRPC service.

See Migration guide.

Configure

Patch via MCP patch_config_communications (?modules=communications or aliases email, push, sms):

KeyDefaultMeaning
email.activefalseEnable email channel
email.transportsmtpProvider: smtp, sendgrid, mailgun, amazonSes, mandrill, mailersend
email.sendingDomainconduit.comAppended to bare sender names
email.storeEmails.enabled—Persist sent email records for resend/history
pushNotifications.activefalseEnable push channel
pushNotifications.providerName—firebase, onesignal, amazonSns
sms.activefalseEnable SMS channel
sms.providerNametwiliotwilio, awsSns, messageBird
sms.twilio.verify.activefalseTwilio Verify for OTP flows
orchestration.retryAttempts3Retries per channel send
orchestration.fallbackTimeout5000Default fallback step timeout (ms)

Client API

Push and in-app notification routes (authenticated). Served at the router root (no module prefix):

MethodPathPurpose
POST/tokenRegister device token { token, platform }
DELETE/tokenClear tokens; optional ?platform=
GET/notificationsIn-app inbox (read, skip, limit, platform)
PATCH/notificationsMark read { id } or { before }

Sending email, SMS, or push is Admin API or grpc-sdk only — not from browser-exposed app code.

Admin API

All routes require Admin API authentication. Default Admin port: 3030. Paths use /email, /push, /sms — never /pushNotifications.

/email

MethodPathPurpose
POST/email/sendSend — templateName or inline subject + body
GET/email/templatesList EmailTemplates (skip, limit, sort, search)
POST/email/templatesCreate EmailTemplate
PATCH/email/templates/:idUpdate EmailTemplate
DELETE/email/templates/:idDelete EmailTemplate
GET/email/templates/externalList provider-managed templates
POST/email/templates/external/syncSync external templates into Conduit
POST/email/resendResend by email record { id }
GET/email/emailsSent email history
GET/email/emails/:idSingle email record

/push

MethodPathPurpose
POST/push/sendSend — userId, title, body, optional data, platform, isSilent, doNotStore
GET/push/tokensList device tokens
GET/push/tokens/:idSingle token
DELETE/push/tokens/:idRemove token

/sms

MethodPathPurpose
POST/sms/sendSend SMS — to, message
GET/sms/messagesSent SMS history
GET/sms/messages/:idSingle SMS record

Orchestrator (/send)

MethodPathPurpose
POST/send/multipleMulti-channel broadcast — channels, strategy, recipient, subject?, body?, variables?
POST/send/fallbackFallback chain — fallbackChain[{ channel, timeout }], recipient, subject?, body?, variables?

CommunicationTemplate (GitOps)

Multi-channel CommunicationTemplate documents have no dedicated Admin REST CRUD yet. Manage via state export/import (communicationTemplates), direct database provisioning, or gRPC RegisterCommunicationTemplate from server-side workers (placeholder until unified template CRUD is complete).

grpc-sdk

ClientUse when
grpcSdk.emailLegacy email send, template register, status — routes to communications
grpcSdk.pushNotificationsLegacy push send, token management
grpcSdk.smsLegacy SMS send, Twilio Verify
grpcSdk.communicationsUnified API: sendMessage, sendToMultipleChannels, sendWithFallback, getMessageStatus

Never import grpc-sdk in client components or browser bundles.

MCP

  • ?modules=communications — full module tools and config
  • Aliases: ?modules=email, ?modules=push, ?modules=sms, or ?modules=email,push,sms
  • Invalid: push-notifications — use push or communications
ToolPurpose
get_config_communicationsRead email, push, SMS, orchestration settings
patch_config_communicationsProvider credentials and channel toggles
post_email_templatesCreate Handlebars EmailTemplate

Next steps

  • Migration from v0.16
  • GitOps state export
  • Authentication (2FA, verify email)
  • Chat (invite email/push)
  • Admin API reference
  • MCP tools

Storage

File uploads, cloud providers (S3, Azure, GCS), signed URLs, public access, folder markers, and Prometheus metrics.

Chat

Realtime rooms and messages over REST and Socket.io.

On this page

Use casesCapabilitiesExample: Template, email send, and fallbackHow it worksConfigureClient APIAdmin API/email/push/smsOrchestrator (/send)CommunicationTemplate (GitOps)grpc-sdkMCP