CPaaS Explained: Adding SMS, Voice and Video to Apps With APIs
December 3, 2026 · 11 min read

Almost every app needs to talk to people outside the app: login codes, delivery updates, appointment reminders, support calls, video consultations and marketing messages. Building telecom connections for each country and channel would be impossible for most businesses, so they use APIs instead. CPaaS (Communications Platform as a Service) is a cloud platform that lets developers add SMS, voice, video, chat app messaging, email and verification to their software through APIs, paying for what they use. This guide explains how CPaaS works, the main channels, use cases, how SMS pricing really works, a tested example that counts message segments and blocks SMS pumping fraud, registration and consent rules, RCS and encryption, choosing a provider, building with Node.js and indicative costs.
How CPaaS Works
- Your app calls an API to send a message, start a call or create a video room.
- The CPaaS provider routes it through its connections with mobile operators, messaging platforms and telephone networks worldwide.
- Delivery events come back through webhooks: delivered, failed, read, replied or call completed.
- Incoming messages and calls to your numbers are sent to your app through webhooks, so it can reply automatically.
- You pay per use: per message segment, per minute, per verification or per active user.
The provider handles carrier relationships, number provisioning, regulatory registration support and scaling, so developers focus on the experience.
Channels
| Channel | Typical uses | Notes |
|---|---|---|
| SMS | One-time passcodes, alerts, reminders, delivery updates | Works on every phone; pay per segment; registration rules in many countries |
| RCS | Branded, rich messages with images and buttons | Upgrade to SMS on supported phones; falls back to SMS |
| WhatsApp and chat apps | Customer service, notifications, conversational commerce | Template approval and opt-in rules apply |
| Voice | Calls, IVR menus, call tracking, voice OTP | Numbers in many countries, recording and transcription |
| Video | Telehealth, video support, virtual classes | WebRTC-based rooms and recordings |
| Receipts, notifications, marketing | Often bundled with CPaaS; deliverability rules apply | |
| Verification APIs | Phone verification, SIM swap checks, silent authentication | Fraud prevention for sign-up and login |
Common Use Cases
| Use case | Channels | Example |
|---|---|---|
| Authentication | SMS, WhatsApp, voice, verification APIs | Login codes and phone number verification |
| Notifications | SMS, RCS, push, email | Delivery, appointment and payment alerts |
| Customer support | Chat apps, voice, video | Support conversations linked to the CRM |
| Marketplaces | Masked calling and messaging | Buyers and sellers talk without sharing numbers |
| Marketing | SMS, RCS, WhatsApp, email | Consent-based campaigns and abandoned-cart reminders |
| Contact centres | Voice, chat, AI agents | Routing, recording and AI-assisted conversations |
Marketplaces are a good example. Our guide to the agriculture marketplace describes how buyers and sellers coordinate; masked numbers let them call and message through the platform without revealing personal numbers, while keeping records for dispute resolution.
How SMS Pricing Really Works
SMS is billed per segment, not per message. A message using the standard GSM-7 character set fits 160 characters in one segment, but longer messages are split into segments of 153 characters because each part needs a header. If a message contains any character outside GSM-7, such as an emoji or many accented letters, the whole message switches to UCS-2 encoding and the limit drops to 70 characters per segment. Some common characters, such as the euro sign and square brackets, count as two characters in GSM-7. Small wording changes can therefore double or triple costs at scale.
Example: Segment Counting and SMS Pumping Protection
SMS pumping, also called SMS toll fraud, is one of the most expensive risks for apps that send codes. Twilio describes it as bad actors requesting large volumes of text messages from unprotected endpoints, inflating costs while fraudsters share revenue from the traffic. The tested Node.js example below counts segments for three messages, then protects a one-time passcode endpoint with a country allowlist, per-number and per-IP limits, and a conversion alarm comparing codes sent with codes verified.
// CPaaS helpers: work out how many SMS segments a message uses (which is
// what you pay for), and guard an OTP endpoint against SMS pumping fraud with
// per-number and per-IP limits, a country allowlist and a conversion alarm.
const GSM7 = "@£$¥èéùìòÇ\nØø\rÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ !\"#¤%&'()*+,-./0123456789:;<=>?¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà";
const GSM7_EXT = "^{}\\[~]|€"; // these count as two characters
function segments(text) {
const chars = [...text];
const gsm = chars.every(c => GSM7.includes(c) || GSM7_EXT.includes(c));
const len = gsm ? chars.reduce((n, c) => n + (GSM7_EXT.includes(c) ? 2 : 1), 0) : text.length; // UCS-2 counts UTF-16 units; emoji use 2
const [single, multi] = gsm ? [160, 153] : [70, 67]; // multipart messages lose space to headers
return { encoding: gsm ? "GSM-7" : "UCS-2", length: len, segments: len <= single ? 1 : Math.ceil(len / multi) };
}
for (const t of ["Your code is 482913. It expires in 10 minutes.",
"Your order total is €120 [ref ABC]. Reply STOP to opt out.".repeat(3),
"Your code is 482913 ✅"]) {
const s = segments(t);
console.log(`${s.encoding} ${String(s.length).padStart(3)} chars -> ${s.segments} segment(s): "${t.slice(0, 32)}..."`);
}
const ALLOWED = new Set(["44", "1", "353"]); // countries you actually serve
const perNumber = new Map(), perIp = new Map();
let sent = 0, verified = 0;
function requestOtp(phone, ip) {
const cc = phone.match(/^\+(44|1|353|\d{2,3})/)[1];
if (!ALLOWED.has(cc)) return "blocked: country not served";
const n = (perNumber.get(phone) ?? 0) + 1, i = (perIp.get(ip) ?? 0) + 1;
if (n > 3) return "blocked: too many codes for this number";
if (i > 5) return "blocked: too many requests from this IP - show CAPTCHA";
perNumber.set(phone, n); perIp.set(ip, i); sent++; return "sent";
}
console.log(requestOtp("+447700900123", "203.0.113.4"));
console.log(requestOtp("+88216000001", "198.51.100.66")); // premium-rate range often used in pumping
for (let k = 0; k < 6; k++) requestOtp(`+1555010${k}00`, "198.51.100.66");
console.log(requestOtp("+15550109999", "198.51.100.66"));
verified = 1;
console.log(`conversion ${verified}/${sent} = ${(verified / sent * 100).toFixed(0)}% ${verified / sent < 0.5 ? "-> ALERT: possible SMS pumping" : ""}`);
Output:
GSM-7 46 chars -> 1 segment(s): "Your code is 482913. It expires ..."
GSM-7 183 chars -> 2 segment(s): "Your order total is €120 [ref AB..."
UCS-2 21 chars -> 1 segment(s): "Your code is 482913 ✅..."
sent
blocked: country not served
blocked: too many requests from this IP - show CAPTCHA
conversion 1/6 = 17% -> ALERT: possible SMS pumping
The plain 46-character code message fits in one GSM-7 segment. The 183-character order message needs two segments because the euro sign and brackets count double and long messages lose space to headers. Adding a single emoji switches the third message to UCS-2, which still fits in one segment here but would cut the limit to 70 characters for longer text. On the fraud side, the request to a premium-rate range in a country the app does not serve is blocked, the IP sending bursts of requests is stopped after five, and only one of six codes sent has been verified, a 17 per cent conversion rate that triggers an alert. Real systems add CAPTCHA, device signals and provider fraud tools, and review conversion by country and number prefix daily.
Better Alternatives to SMS Codes
SMS codes are convenient but vulnerable to SIM swap fraud, interception and pumping. Many apps now offer stronger options: passkeys, authenticator apps, push approvals in an existing app and network-based checks that confirm a phone number silently or detect recent SIM changes. Our guide to two-factor authentication compares methods, and our guide to eSIM explains how SIM transfers affect security. SMS remains useful as a fallback, but should not be the only option for high-value accounts.
Registration, Consent and Compliance
- Sender registration: many countries require businesses to register brands, sender IDs or campaigns, such as A2P 10DLC registration for US long-code texting.
- Consent: marketing messages need opt-in consent under laws such as the US TCPA, the UK PECR and the EU's ePrivacy rules, with easy opt-out.
- Quiet hours: avoid sending marketing messages at night in the recipient's time zone.
- Chat app policies: WhatsApp business messaging requires opt-in and approved templates for many message types.
- Call recording: tell callers when calls are recorded and follow local rules.
- Data protection: message content and phone numbers are personal data.
This article is general information, not legal advice.
RCS and End-to-End Encryption
RCS upgrades SMS with branded sender profiles, images, carousels and suggested reply buttons, and falls back to SMS when a phone does not support it. It is also becoming more secure: Apple began a beta of end-to-end encrypted RCS between iPhone and Android in iOS 26.5, based on the GSMA's RCS Universal Profile 3.0 and the Messaging Layer Security protocol, with carrier support required. For businesses, RCS offers richer customer experiences and better tracking than SMS, though availability still depends on operators and devices.
Conversational Messaging and AI
Customers increasingly expect to reply to notifications and get help in the same thread. CPaaS webhooks pass incoming messages to your systems, where an AI agent or support team can respond. Our guide to building a WhatsApp AI chatbot shows how conversational support works on chat apps. Hand-offs to humans, conversation history and clear opt-outs keep automated messaging helpful rather than frustrating.
Choosing a CPaaS Provider
- Coverage and quality: direct operator connections in your key countries and good delivery rates.
- Channels: the channels you need now and later, such as RCS, WhatsApp and video.
- Pricing: per-country rates, number fees, volume discounts and verification pricing.
- Fraud tools: built-in protection against SMS pumping and account takeover.
- Developer experience: documentation, SDKs, test tools and webhook reliability.
- Compliance support: help with registration, consent records and data residency.
Larger senders often use more than one provider for redundancy and price, routing messages by country and performance.
Building With CPaaS in Node.js
- Templates: store message text centrally, with segment counts checked before sending.
- Queues: send through a job queue with retries, so spikes do not overload APIs.
- Webhooks: verify signatures, handle duplicates and record delivery status.
- Preferences: respect each user's channel choices and opt-outs across SMS, email and chat apps.
- Monitoring: delivery rates, costs and conversion by country and channel.
Marketing teams often trigger messages from automation platforms; our guide to marketing automation software explains how SMS fits into automated journeys.
CPaaS From the Operator Side
Telecom operators both supply CPaaS providers and offer communication APIs themselves, including network APIs for location, quality on demand and fraud prevention. Selling messaging and network capabilities through APIs requires usage-based rating and wholesale settlement, covered in our guide to telecom billing software.
Indicative Costs
The figures below are indicative estimates, not quotes.
| Item | What is included | Indicative estimate |
|---|---|---|
| CPaaS integration in an existing app | OTP, notifications, templates, delivery tracking, fraud controls | USD 10,000 to 40,000 |
| Omnichannel messaging hub | SMS, WhatsApp, email, preferences, routing, analytics | USD 40,000 to 120,000 |
| Contact centre or video product on CPaaS | Voice, video, AI agents, CRM integration, recordings | USD 80,000 to 250,000+ |
| Usage fees | Per message, per minute, per verification | Varies widely by country and channel |
Frequently Asked Questions
What is CPaaS?
Communications Platform as a Service: cloud APIs that let developers add SMS, voice, video, chat app messaging, email and verification to their apps.
How is SMS priced?
Per segment; GSM-7 messages fit 160 characters in one segment, while emoji switch to UCS-2 with 70 characters per segment.
What is SMS pumping fraud?
Fraud where attackers trigger large volumes of SMS from unprotected endpoints, often to premium numbers, to inflate costs and share the revenue.
How do you prevent SMS pumping?
Block countries you do not serve, limit requests per number and IP, use CAPTCHA and monitor verification conversion rates.
What is the difference between CPaaS and UCaaS?
CPaaS provides APIs for developers to build communication into apps, while UCaaS provides ready-made business phone, meeting and chat tools.
Is RCS replacing SMS?
RCS is growing on supported phones and networks, but SMS remains the universal fallback for business messaging.
Add Communication to Your App With CPaaS
CPaaS lets any product talk to customers on the channels they prefer, provided it is built with cost control, consent and fraud protection in mind. Our team builds Node.js messaging services, OTP and verification flows, SMS pumping protection, omnichannel notification hubs, WhatsApp and RCS integrations and voice and video features. This article is general information, not legal advice, and costs are indicative estimates. Contact us to discuss CPaaS integration for your app.