Messaging API

The Messaging API allows you to enrich your messages with the advanced features provided by various channels. You can include images, GIFs, videos, surveys, link buttons, and more. Choose delivery channels in a cascading order, and if the send to one channel fails, the service sends the message using the next channel.

Available channels include:

  • Rich communication services (RCS)
  • WhatsApp
  • Viber
  • MMS
  • SMS
NOTE:

Although this API can be used purely to send SMS-messages, without even attempting to send on another channel, you may find our SMS API more convenient and streamlined for that use case.

Common Use Cases:

  • Rich Media - You can include photos, GIFs, and video in messages.
  • Trusted Messages - You can include branded messaging using customizable colors and logos and a verified business checkmark.
  • Message Templates - Create a template for a campaign’s messages in advance, making it easier to send requests.

General Requirements

  • Base URL: rest-ww.telesign.com
  • Protocols: https
  • Authentication: Basic
  • Encoding: Accepts only UTF-8 unicode characters as inputs.
  • Accepts: application/json
  • Responds With: application/json
  • Required Headers: Content-Type - json

Basic Usage

  1. Set up a Transaction Callback Service to receive notifications about messages sent through this API.
  2. Select the primary channel you want to use: RCS, MMS, Viber, or WhatsApp.
CAUTION:

Although the SMS channel is technically usable with any template, we recommend only using it for a fallback message, not as the primary channel. Rendering of advanced features is most reliable on other channels.

  1. If you have not already done so, work with our Customer Support Team to set up an account for any channels you plan to use (RCS, WhatsApp, etc.). Detailed instructions for either case can be found on these pages:
  1. Select a template from the tables below based on your desired primary channel and use case. If there is feature of the channel you want to use that you don’t see covered by these templates, see our how-to guide Add Custom Template.

RCS: Templates by Use Case

Use Case Templates
Just Text text
Image media
Video Player (embedded) media
Audio Player (embedded) media
File Attachment file
Location Coordinates location
Question with Suggested Answers 2_suggested_replies 3_suggested_replies
Link Button url_action
Click-to-call Button dial_action
Link Button in Rich Card rc_url_action_vertical rc_url_action_horizontal
Click-to-call Button in Rich Card rc_dial_action_vertical rc_dial_action_horizontal

WhatsApp: Templates by Use Case

Use Case Template
Just Text text
Image image
Video Player (embedded) video
Audio Player (embedded) audio
File Attachment file
Location Coordinates location

MMS: Templates by Use Case

Use Case Template
Image image
Video Player (embedded) video
Audio Player (embedded) audio
CAUTION:

You can only send MMS messages from US sender IDs and only with short codes.

Viber: Templates by Use Case

Use Case Template
Just Text text text_2way text_session
Image image image_2way image_session
Link Button url_action

Some Viber templates can only be used with certain account types:

Account Type Supported Templates
one-way chat text image url_action
two-way chat text_2way image_2way
session chat text_session image_session
NOTE:

If you are using SMS as a backup channel, we recommend using text for a text-only template. Advanced features may not render as expected on SMS.

  1. (Optional) Select one or more backup channels, if desired.
  2. Send a request to the API, referring to the documentation pages below for your primary channel and use case as needed.

Documentation by Category

Other Resources

  • Compliance - Learn messaging compliance best practices from these articles in our Support Center.