Samarpit Santoki

, 3 min read

One API, four channels

At Decklar I built CommAgent, which puts email, SMS, RCS, and voice behind one API. As of July 2026 it handles more than 150,000 conversations a month across over 100 customer environments.

The idea is easy to draw: one API in front, one adapter per channel, providers behind them. These are the parts the drawing leaves out.

Sending means something different on every channel

An email has a subject, a body, and maybe attachments. It can bounce. An SMS gets split into segments and comes back with a carrier receipt. RCS only works where the phone and carrier support it, so it needs SMS as a fallback. WhatsApp only lets a business start a conversation with a pre-approved template, outside the 24-hour window after a customer writes in. A phone call isn’t a message at all. It’s a conversation with a start, an end, and everything said in between.

So the part that’s truly shared is small: who you’re contacting, on which channel, what you want to say, and an ID to follow it. I’d rather keep the shared part small than build a clean interface that quietly drops what makes each channel different.

Accepted is not delivered

When you call a provider, the first answer you get is usually “got it”. That means they accepted the request. It doesn’t mean anyone received anything. The real outcome comes later, through callbacks: sent, delivered, failed, read.

The status model should say what you actually know at each point. “We handed this to the provider” and “the provider says it was delivered” are different facts. If the API blurs them, someone will eventually tell a customer a message arrived when it didn’t.

A timeout tells you nothing

Sometimes the request to the provider times out. Did the message go out? You don’t know. Retry, and you might send someone the same payment reminder twice. Don’t retry, and you might send nothing.

An idempotency key stops duplicate requests into your own system. It doesn’t fix the timeout, because only the provider knows whether it sent, and not every provider deduplicates. So whether to retry depends on the message. Resending a one-time password is fine. Resending a billing notice probably isn’t. The caller should decide that per message type.

Callbacks arrive out of order

A “delivered” callback can show up before the “sent” callback that should have come first. Some providers send the same event twice. If you apply callbacks in the order they arrive, a message can look delivered, then sent, then delivered again.

Give each status a rank and only ever move up. A late “sent” after “delivered” changes nothing. Store every raw callback anyway, for debugging.

One ID from start to finish

If I had to pick one thing to build first, it would be an ID that follows a message from the first API call to the last provider callback. Then “did the customer get this?” is one lookup, not a search through three services’ logs. It’s what makes debugging and support possible at all.