Transports

Unifonic

Send SMS through the Unifonic el.cloud REST API.

Send SMS through Unifonic’s el.cloud REST API for transactional texts such as OTPs and alerts. Wire the transport into createSmsSender so app code stays on the SMS channel API.

The one rule

Create this transport under createSmsSender — do not call Unifonic from app code directly.

Quick start

import { createSmsSender } from "sently/sms";
import { UnifonicTransport } from "sently/transports/unifonic";

const sender = createSmsSender({
  transport: new UnifonicTransport({
    appSid: process.env.UNIFONIC_APPSID!,
    senderId: "MyBrand",
  }),
});
const result = await sender.send({ to: "+9665xxxxxxxx", body: "Hello" });
console.log(result.messageId, result.status);

Configuration

OptionTypeDefault or requirement
appSidstringrequired (AppSid)
senderIdstringrequired on send unless options.from is set
statusCallbackstringoptional public HTTPS DLR URL
asyncbooleanfalse

options.from maps to SenderID. options.messageId maps to CorrelationID. Phone numbers are normalized to international digits without + or leading 00.

Delivery webhooks

Parse Unifonic status callbacks with sently/webhooks/unifonic into DeliveryEvent[].

import { parse } from "sently/webhooks/unifonic";

const events = parse(await request.json());

Troubleshooting

Learn more

Next

On this page