Blog

3 Types of User Communication APIs and When to Use Them

Nick GottliebNick GottliebUpdated
user-communication-apis-header

Think about the last time you ordered something online. If the order confirmation didn't land within seconds, you probably started to wonder whether something went wrong. Missing or out-of-date information costs you your users' trust fast.

A growing set of APIs now handles real-time order emails, push based on in-app activity, and live chat with sales and support. Each type fits different jobs, and picking the right one for each job saves you engineering time later.

Planning your communications API strategy

The best communications strategy is one your users never notice. Every message shows up when it should, on the channel it should. Inside your company, the people who write messages can send them without filing a ticket with engineering.

Take a marketplace app. Sellers need a push notification or email every time someone comments on an item they're selling. Marketing wants to email everyone who bought something in the past six months about an upcoming sale. And when a buyer's checkout fails, they need a way to reach your support team and finish the purchase.

Those are three different jobs, and each one maps to a different type of communications API.

The three types

Communications APIs differ in what they do, how fast they need to respond to user actions, and which team at your company sends through them.

App-to-user APIs send instant, highly customizable messages from your application code, like push notifications about likes or comments. Brand-to-user APIs let your marketing and product teams send targeted messages to one user or a whole segment. User-to-user APIs power live conversations, either between your users or with your sales and support staff.

App-to-user APIs

App-to-user messages are transactional and triggered from your application code. They're usually the most critical of the three because they're part of the product itself: your ride has arrived, your order was received, you've been added to a chat room, here's your one-time login code. They're time-sensitive and go out the moment the triggering event happens.

A good app-to-user API gives you multiple channels (email, SMS, push, and in-app), routing between them, and an easy way for users to opt in and out. You can automate most of it, too. When someone signs up, your app sends a welcome email without anyone on your team touching it.

Engineering usually owns this type. If you have the resources to build your own, the guide to building a user notification system walks through the requirements, and multi-channel notifications in your AWS stack shows one way to wire it up.

Courier covers this type and the next one. You send through the Send API, and Courier routes each message across email, SMS, push, the in-app inbox, Slack, Microsoft Teams, and more. Your marketing and product teams build journeys and broadcasts in the dashboard on the same user profiles and channels, and everything they do there is available through the API too.

Brand-to-user APIs

Brand-to-user communication happens any time your company has a message for a specific group of users. Maybe product noticed a user got partway through sign-up but never hit "complete." Maybe marketing wants to tell everyone in New York about an upcoming in-person event.

Braze and Customer.io are two examples of standalone brand-to-user platforms. Engineering adds API calls to the app that log user behavior, and that data flows into a dashboard the rest of the company can use. From there, anyone on those teams can build messages for specific segments, like users who didn't finish sign-up or who live in New York. Once the tracking calls are in place, any team that needs to send a campaign can do it without waiting on engineering.

The catch with a separate tool is that you now run two systems. Transactional messages go out from one and campaigns from the other, and you keep user data, templates, and opt-outs in sync between them. And when you want to target behavior you haven't been tracking, engineering adds new calls, and the data needs time to build up before anyone can use it.

In Courier, brand-to-user sends live next to your app-to-user ones. A journey runs once per user when an event or API call triggers it, with delays and branches between sends, which fits the unfinished sign-up. A broadcast sends one message to a list or an audience, a rule-based segment Courier keeps current from profile data, which fits the New York event. Broadcasts use the same editor as your templates, and Courier checks each member's preferences on list and audience sends, so someone who opted out of that topic doesn't get it.

User-to-user APIs

User-to-user APIs power live conversations between two or more people: a user and someone on your staff, or one user and another.

Support tickets are user-to-user, and so are live chat boxes that connect customers with your support or sales team. So is a marketplace where buyers and sellers message each other about bids or shipping. You can build these in-house, but most companies save time with a ready-made product such as Zendesk or Fin (formerly Intercom).

The conversation lives in the chat tool, but the alert that tells someone a reply is waiting is an app-to-user notification. If the other person is offline, that's an email, push, or inbox message your app sends.

Most apps use all three

Most apps end up using all three types, and the fewer separate systems your app-to-user and brand-to-user messages run through, the less you have to keep in sync.

Illustration by Rebekka Dunlap