Customer journeys built for code and AI

Sendwend is an open-source TypeScript SDK for lifecycle email, push, Slack, and Discord. Keep journeys in your repo: coding agents can write them, the compiler catches mistakes before anything sends, and everything runs on your own infrastructure.

$ npm add sendwend
import { eq, not, performed, trigger, workflow } from 'sendwend';
import { e, u } from './contract';
import { email } from './templates';

/**
 * Convert web users into app users to increase retention
 * and LTV: app users have 1.5x the LTV of web users.
 * Three days after a sign-up on the web, remind the ones
 * who have not installed the app.
 */
export const webToApp = workflow({
  id: 'web_to_app',
  name: 'Web to app',
  trigger: trigger.event(e.sign_up, (p) => eq(p.platform, 'web')),
  reentry: { mode: 'never' },
})
  .delay('3 days')
  .branch([
    not(performed(e.app_installed)),
    (w) => w.email(email.getTheApp, { name: u.name }),
  ]);
web_to_app
Compiled
This TypeScript workflow compiles straight into the interactive Sendwend Studio canvas, generated from real code rather than a static mockup.

Journeys built like the rest of your software

Every journey is type-checked, reviewed in Git, verified by tests, and deployed on the infrastructure you already run.

  • Type-safe and AI-native

    Every journey is written in a typed TypeScript DSL. Whether a teammate or an AI agent edits it, the compiler catches typos, unknown fields, and missing props before anything sends. Because the entire flow lives in code, agents can also review it and suggest smarter lifecycle strategies.

  • EmailReact Email templatePushiOS · Android · WebMessageSlack · Discord

    Multichannel

    Combine email, push notifications, and Slack or Discord messages in a single workflow. Across web, iOS, and Android, every touchpoint shares the same user data, so users get one coherent experience instead of disconnected campaigns on each platform.

  • Real clock7 daysVirtual clockMinutes

    Easy to test

    Test a seven-day journey in minutes instead of waiting a week. Run unit tests on a virtual clock, or speed up time in development (at 600x, a full day takes just 2.4 minutes) so your team can verify changes the same day.

  • awsAWSLambda durable functionsCloudflareWorkersSelf-hostedNode + Postgres

    Infrastructure-agnostic

    Run the same journeys on Cloudflare Workers, AWS Lambda, or self-hosted Node with Postgres. Because the engine stays decoupled from the runtime, every platform gets native integration with identical behavior. Use the stack your team already knows, and switch hosts later without touching your workflow code.

Why a DSL

Visual builders trap your logic in clicks where mistakes slip through and AI can't help. General-purpose code gives up visual flows, consistent metrics, and guardrails. Sendwend's DSL is the middle ground: declarative TypeScript that catches errors early, keeps AI on track, and doubles as a visual canvas.

Visual builderManual clicks, easy to breakSendwend DSLTyped, checked, and visualWorkflow codeFree-form, not visual

Local time, local language

9 AM in Tokyo, Berlin, and San Francisco are three different moments. Time windows read each user's time zone and deliver at the right local hour automatically. Localization works just as naturally: templates are React components that take the user's locale as a prop and reuse your app's existing i18n setup.

.timeWindow({ between: ['09:00', '10:00'], tz: 'user' })2000040812162024UTC09:00おはようTokyo00:00 UTC09:00Guten MorgenBerlin08:00 UTC09:00Good morningSan Francisco17:00 UTC

Pay for usage, not profiles

Most platforms charge per stored profile, so your bill climbs as your user base grows, even when most of them are inactive. Sendwend runs on your own cloud and existing Postgres database: you only pay for what you actually send, typically over 90% less than Customer.io.

10,000 profiles
40,000 emails a month
50,000 profiles
200,000 emails a month
250,000 profiles
1,000,000 emails a month
Monthly cost in USD, with each product's multiple relative to Sendwend. Each tier uses its own scale. Public list prices as of November 30, 2026.

Frequently asked questions

Didn't find your answer? Send us a message and we'll reply by email.

Choose Customer.io or Braze if non-technical marketers need a drag-and-drop UI to edit campaigns every day. Choose Temporal or Inngest for general-purpose backend jobs. Choose Sendwend when engineers or AI agents own lifecycle messaging and you want type safety, built-in tracking and unsubscribes, and over 90% lower cost.
In your own Postgres database, under a workflow schema by default (configurable). Profiles, events, journey state, and delivery metrics stay inside your data boundary, and you create the tables using the plain SQL DDL or Drizzle schema the SDK generates.
Every running journey stays pinned to the workflow version it started on until it finishes, no matter how many times you deploy. Message templates aren't pinned, so fixing a typo or updating copy takes effect immediately for upcoming sends.
Each send is claimed in Postgres with a stable idempotency key before hitting the provider, guaranteeing at-most-once delivery even when durable steps retry. Topic and channel opt-outs, plus RFC 8058 one-click unsubscribe links, are built in and automatically skip opted-out users.
Yes. Sendwend Studio reads your config and renders every workflow as an interactive canvas alongside its message templates and delivery reports, so product and marketing teammates can inspect flows and performance without reading code.
Sendwend is free and MIT-licensed, with no per-profile fees or seat limits. You only pay for the underlying infrastructure you choose: your compute host, Postgres database, and email or push provider.

Start with one journey

Install the SDK, define your first workflow in TypeScript, and verify it locally before sending a single message.

$ npm add sendwend