How to Send Notifications to Any Channel In Your Marketing Stack: Introducing Channels API

Ever wished you could send personalized notifications to any channel or device in your marketing stack — from one centralized platform? Now you can. Learn how.

Airship
5 min readAug 23, 2017

by Greg Weinger Director, Product Management, Urban Airship

Send notifications anywhere and everywhere with our game changing Channels API. Learn more in this post — and contact us anytime to talk through use cases for your brand.

Ever wished you could send personalized notifications to any channel or device in your marketing stack — from one centralized platform?

Today, we are making that dream a reality through our Channels API, a new approach to connecting Urban Airship to any system through easily extensible APIs, that eschews the common “closed” marketing system approach that requires you to rip and replace existing investments.

Channels API has all of the powerful services of our Digital Growth Platform accessible — like segment builder, real-time automation and user-level personalization — so you can create and send notification-style messages anywhere.

Once you’ve created the notification, our Channels API allows you to send it to any channel from any service provider in your stack: email, SMS, AR/VR devices, chatbots, voice systems, tvs, cars and in-home smart assistants like Alexa or Google Home. The sky’s the limit.

And, unlike a basic webhook implementation, our approach creates a dedicated channel you can reuse to orchestrate, deliver and analyze messages across all of your customer communication platforms.

The best part? No matter what device or experience emerges on the market over the next few years, you’ll be ready.

Creating APIs that put your customer data to work for you anywhere and everywhere is part of our commitment to helping our customers future-proof their martech stack. (Learn more about our vision here: Making Sure Your Future, Our Future, Everyone’s Future is Wide Open.)

Bottom line: this is going to change the way you think about the notifications you can send — and how you send them.

As a case in point, let’s look at how you could put the Channels API to work for you to send SMS through Amazon Web Services (AWS).

Use Case: How To Send SMS Through AWS Using Channels API

Let’s say you’re trying to send a maintenance notice to your customer base, and you want to send it to both your app and your SMS audience at the same time.

Our Channels API consists of a set of endpoints for the management of channels and platforms. We support both native platforms like iOS, Android and Web browsers, which include dedicated SDKs, and open channels that you can connect through a webhook and other APIs.

There are two key integrations required to expose a new open channel:

  • Channel Registration API: Lets you register new channels in the Urban Airship system — like an SMS number or email address.
  • Delivery Integration: A webhook that receives “deliveries” of the Channel API payload out of Urban Airship. It also translates and routes your request to its destination on a third party system like Amazon SNS.

Getting Started

Here are the steps to take to set up a Channels API integration:

1) Set Up Your Delivery Webhook Server

First off, you’ll want to stand up a webhook server, which is a simple web service hosted anywhere on the public internet (see detailed instructions). For this example we used the Amazon API Gateway to host a REST API as our webhook server. We backed this by Amazon Lambda functions, written in Java.

Your webhook has to accept HTTPs connections, and implement 2 methods:

The /validate request returns a code generated by Urban Airship to validate your identity. The /push method is what receives delivery payloads — individual SMS messages in this case — depending on your implementation.

2) Configure Your New Webhook in the UA Dashboard

Next up, you’ll define your new open channel for a given project within the Urban Airship dashboard, under Settings > Platforms. Give it an API name, friendly name, and supply your delivery webhook URL:

The webhook has to support HTTP Basic Auth — that’s the username and password you enter into the Urban Airship console above. Once you click save we’ll provide you with a validation code:

Use this code to implement the /validate method within your webhook. Here is the logic within the Lambda function we wrote that backs that endpoint:

The /push method is the heart of your webhook. It’s responsible for receiving delivery payloads — in our case SMS messages — and forwarding them to the corresponding Amazon Web Service.

When you send a push from Urban Airship’s push API and target an open channel, your webhook will receive sets of delivery payloads that look something like this:

Here is code from our example SMS implementation, which is responsible for receiving these payloads, parsing them, and then forwarding them on to Amazon SNS. It instantiates a new Amazon SNS client, parses each delivery payload, and then goes about sending each SMS message:

Then we’d send the result to our SNS client:

3) Registering a Number

Now that you’ve got your webhook running and configured, you’re almost ready to start sending! But first you’ll need someone to send it to.

The next step is to register subscribers within the system — phone numbers that can be used to deliver SMS messages to. In UA platform terms, this means you’ll register a channel with your service.

Then, you’ll associate that channel with a user — a named user identifier within our system.

4) Sending Your Notification

Finally, you’ll send messages through our Push API.

Conclusion

And that’s how you set up a new open channel in our platform! Once complete, it’s a dedicated channel in our platform you can use to reach your customers.

In today’s digital environment, where new channels and devices like Alexa and HomePod are always emerging, we believe you need an extensible notification solution that allows you to grow with you as your needs grow. The days of rip and replace, and lowest common denominator marketing can be behind us.

We can’t see what great connections you build. Learn more about Channels API in our Docs, or contact us to talk about use cases for your brand.

Originally published at www.urbanairship.com.

--

--

Airship

Urban Airship is now Airship! Leading brands trust us to help them achieve digital growth. We make mobile moments magic. www.airship.com