AbsoluteJS

@absolutejs/dispatch-vonage

@absolutejs/dispatch-vonagev0.2.0betaMessaging

Production Vonage Messages API adapter for AbsoluteJS with multichannel failover, signed durable webhooks, consent, readiness, and 10DLC inspection.

#Installation

BASH
bun add @absolutejs/dispatch-vonage

#Capabilities

Overview

Production Vonage Messages API adapter for @absolutejs/dispatch. It supports SMS, MMS, RCS, WhatsApp, Viber, and Facebook Messenger; ordered provider-native failover; signed durable webhooks; consent ingestion; tenant routing; readiness; and 10DLC inspection.

Send with failover

extensions.vonage accepts channel-specific message content such as an RCS carousel while protecting routing, sender, recipient, and failover fields from override.

Signed durable webhooks

The handler requires an HS256 Bearer JWT, validates issuer, API key, application binding, issuance time, signature rotation, and the SHA-256 hash of the exact raw request body before parsing. Normalized events include typed content/endpoints, fallback attempt position, price/currency, SMS segments, network code, provider errors, and delivery/read state. Completed inbox rows default to 24-hour retention; pending work remains recoverable.

Operational boundaries

Native scheduling is intentionally rejected; enqueue the Dispatch call so

consent is re-evaluated immediately before delivery.

inspectVonageMessagingReadiness() checks the live application webhooks plus

Show 9 more

durable inbox, signature, consent, opt-out, and carrier assertions.

createVonageRegistrationManager() registers and inspects 10DLC brands and

campaigns, then links approved sending numbers

createVonageRcsCapabilityManager() checks device reachability and supported

RCS features before choosing rich content or a fallback

createVonageMessageController() revokes supported outbound RCS messages and

marks inbound WhatsApp messages read and number linkage through a narrow API client.

OTP/Verify, number intelligence, support conversations, and campaigns remain

separate product boundaries rather than being hidden inside Dispatch.

Outcomes

What you can build

Build on the supported package contract

Use @absolutejs/dispatch-vonage through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/dispatch-vonage version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/dispatch-vonage example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#Send with failover

Partial snippet

Working example for Send with failover.

TS
import { createDispatcher } from "@absolutejs/dispatch";
import {
  createPostgresIdempotentOperationStore,
  createPostgresTransactionRunner,
  createVonageAdapter,
} from "@absolutejs/dispatch-vonage";
import { Vonage } from "@vonage/server-sdk";

const client = new Vonage({
  applicationId: process.env.VONAGE_APPLICATION_ID!,
  privateKey: process.env.VONAGE_PRIVATE_KEY!,
});
const runner = createPostgresTransactionRunner(postgresPool);
const messaging = createVonageAdapter({
  apiKey: process.env.VONAGE_API_KEY!,
  applicationId: process.env.VONAGE_APPLICATION_ID!,
  client,
  defaultFrom: {
    rcs: process.env.VONAGE_RCS_SENDER!,
    sms: process.env.VONAGE_SMS_SENDER!,
  },
  idempotencyStore: createPostgresIdempotentOperationStore(runner),
  webhookUrl: "https://app.example.com/webhooks/vonage/messages",
});

const dispatch = createDispatcher({ messaging });
await dispatch.messaging({
  content: {
    actions: [{ kind: "reply", label: "Acknowledge", payload: "ack:42" }],
    kind: "rich",
    mediaUrl: "https://cdn.example.com/incidents/42.png",
    text: "Database latency is elevated.",
    title: "Production incident",
  },
  consent: { programId: "pro-alerts", purpose: "incident-alerts" },
  fallbacks: [
    {
      content: { kind: "text", text: "Database latency is elevated." },
      transport: "sms",
    },
  ],
  idempotencyKey: "incident-42:recipient-7",
  tenant: "tenant-a",
  to: { address: "+12025550100", transport: "rcs" },
});

#Signed durable webhooks

Partial snippet

Working example for Signed durable webhooks.

TS
import {
  createPostgresWebhookInboxStore,
  createVonageWebhookHandler,
} from "@absolutejs/dispatch-vonage";

const webhook = createVonageWebhookHandler({
  consentLedger,
  handler: (event) => lifecycle.record(event),
  inbox: createPostgresWebhookInboxStore(runner),
  resolveAccount: (apiKey) => webhookAccount(apiKey),
  resolveConsentScopes: (event) => programsForNumber(event.from!.address),
});

app.post("/webhooks/vonage/messages", ({ request }) => webhook(request));

#Public entry points

Supported entry points declared by this package manifest.

Package entry point declared in package.json.

@absolutejs/dispatch-vonage@absolutejs/dispatch-vonage/manifest@absolutejs/dispatch-vonage/manifest.json

#Package commands

Scripts declared by this package manifest.

bun run buildrm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/compliance --external @absolutejs/dispatch --external '@absolutejs/dispatch/*' --external @absolutejs/reliability --external '@absolutejs/reliability/*' --external @absolutejs/manifest --external @sinclair/typebox --external @vonage/server-sdk --external '@vonage/*' && tsc --project tsconfig.build.json && absolute-manifest emit
bun run check:packagebun run format && bun run typecheck && bun run test && bun run verify-package && bun run build && bun run verify-package --artifacts
bun run formatprettier --write "./**/*.{ts,json,md}"
bun run testbun test
bun run typechecktsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

45 symbols
createVonageAdapterexportPermalinkSource
TS
createVonageAdapter
Exported from @absolutejs/dispatch-vonage