Build on the supported package contract
Use @absolutejs/dispatch-telnyx through its supported public entry points.
@absolutejs/dispatch-telnyxv0.3.0betaMessagingProduction Telnyx SMS, MMS, and RCS messaging for @absolutejs/dispatch with signed webhooks, consent-safe scheduling, registration workflows, and readiness checks.
bun add @absolutejs/dispatch-telnyxProduction Telnyx SMS, MMS, and direct rich RCS for @absolutejs/dispatch. The package includes multi-account routing, atomic idempotency, Ed25519-signed webhook processing, durable inbox recovery, consent ingestion, scheduling cancellation, RCS capability checks, carrier registration helpers, and readiness diagnostics.
RCS can use portable rich cards and an explicit fallback route. The compliance policy derives both rcs and sms consent checks from these routes:
Use checkTelnyxRcsCapabilities() when product behavior should differ before sending. Telnyx still performs delivery fallback when one is declared.
Apply IDEMPOTENT_OPERATION_POSTGRES_SCHEMA and WEBHOOK_INBOX_POSTGRES_SCHEMA, then use a checked-out transaction runner. Idempotency is scoped by provider, organization, tenant, namespace, and key; payload reuse conflicts, fencing prevents stale completion, and ambiguous provider calls become indeterminate instead of being retried automatically.
resolveAccount() returns one or two active Ed25519 public keys for safe key rotation and an optional Messaging Profile allowlist. Verification covers the raw body and timestamp before parsing or processing. Events are normalized with provider event id, occurrence time, typed endpoints and content, normalized interaction, provider status, transport, and delivery errors. Completed inbox rows default to a 24-hour purge window when the processor runs; applications should also run a scheduled purge and their legal-hold policy.
Native scheduling is opt-in, limited to SMS/MMS from five minutes to five days, and prohibited for consent-scoped messages. Prefer an Absolute queue that re-evaluates consent immediately before delivery. Use createTelnyxScheduledMessageManager() to inspect or cancel native schedules.
createTelnyxComplianceManager() validates privacy/terms, opt-in evidence, current business-registration fields, and exposes explicit a2p and toll-free inspections with rejection diagnostics. It does not certify legal compliance. inspectTelnyxMessagingReadiness() checks the live Messaging Profile/webhook binding plus operator assertions for consent, durable storage, opt-out testing, carrier registration, and RCS approval.
Outcomes
Use @absolutejs/dispatch-telnyx through its supported public entry points.
Hardening checklist
Follow in order
Working example for Send SMS, MMS, and RCS.
import { createDispatcher } from "@absolutejs/dispatch";
import {
createPostgresIdempotentOperationStore,
createPostgresTransactionRunner,
createTelnyxAdapter,
} from "@absolutejs/dispatch-telnyx";
import { Telnyx } from "telnyx";
const client = new Telnyx({ apiKey: process.env.TELNYX_API_KEY! });
const runner = createPostgresTransactionRunner(postgresPool);
const dispatcher = createDispatcher({
messaging: createTelnyxAdapter({
accountId: process.env.TELNYX_ORGANIZATION_ID!,
client,
idempotencyStore: createPostgresIdempotentOperationStore(runner),
messagingProfileId: process.env.TELNYX_MESSAGING_PROFILE_ID!,
rcsAgentId: process.env.TELNYX_RCS_AGENT_ID,
webhookFailoverUrl: "https://failover.example.com/webhooks/telnyx",
webhookUrl: "https://app.example.com/webhooks/telnyx",
}),
});
await dispatcher.messaging({
content: { kind: "text", text: "Production database latency is elevated." },
consent: { programId: "pro-alerts", purpose: "incident-alerts" },
idempotencyKey: "incident-42:recipient-7",
tenant: "tenant-a",
to: { address: "+12025550100", transport: "sms" },
});RCS can use portable rich cards and an explicit fallback route. The compliance policy derives both rcs and sms consent checks from these routes:
await dispatcher.messaging({
content: {
actions: [
{
kind: "url",
label: "Open incident",
url: "https://app.example.com/incidents/42",
},
],
kind: "rich",
mediaUrl: "https://cdn.example.com/incident.png",
text: "Production database latency is elevated.",
title: "Incident 42",
},
consent: { programId: "pro-alerts", purpose: "incident-alerts" },
fallbacks: [
{
content: {
kind: "text",
text: "Incident 42: https://app.example.com/incidents/42",
},
from: { address: "+12025550199", transport: "sms" },
transport: "sms",
},
],
to: { address: "+12025550100", transport: "rcs" },
});Supported entry points declared by this package manifest.
Package entry point declared in package.json.
Scripts declared by this package manifest.
Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.