Messages API Overview

The Messages API allows you to send and in some cases receive messages over SMS, MMS, Facebook Messenger, Viber, and WhatsApp. Further channels may be supported in the future.

The following diagram illustrates how the Vonage Messages API enables you to send messages via multiple channels from a single endpoint:

Messages and Dispatch Overview



This API is currently in Beta.

Vonage always welcomes your feedback. Your suggestions help us improve the product. If you do need help, please email and include the Messages API in the subject line. Please note that during the Beta period, support times are limited to Monday to Friday.

During Beta Vonage will expand the capabilities of the API.

Supported features

In this release the following features are supported:

Channel Outbound Text Outbound Image Outbound Audio Outbound Video Outbound File Outbound Template
SMS n/a n/a n/a n/a n/a
MMS n/a n/a n/a n/a
Viber Service Messages n/a n/a n/a
Facebook Messenger
Channel Inbound Text Inbound Image Inbound Audio Inbound Video Inbound File Inbound Location
MMS n/a n/a n/a n/a
Viber Service Messages n/a n/a n/a n/a n/a
Facebook Messenger

Limited support is also provided for custom objects:

Channel Outbound Button Outbound Location Outbound Contact
SMS n/a n/a n/a
MMS n/a n/a n/a
Viber Service Messages n/a n/a
Facebook Messenger n/a n/a


External Accounts API

The External Accounts API is used to manage your accounts for Viber Service Messages, Facebook Messenger and WhatsApp when using those channels with the Messages and Dispatch APIs.

Getting started

In this example you will need to replace the following variables with actual values using any convenient method:

Key Description
VONAGE_API_KEY Vonage API key which can be obtained from your Vonage API Dashboard.
VONAGE_API_SECRET Vonage API secret which can be obtained from your Vonage API Dashboard.
FROM_NUMBER A phone number you own or some text to identify the sender.
TO_NUMBER The number of the phone to which the message will be sent.

NOTE: Don't use a leading + or 00 when entering a phone number, start with the country code, for example 447700900000.

The following code shows how to send an SMS message using the Messages API:

Write the code

Add the following to

curl -X POST \
     -H 'Content-Type: application/json' \
     -H 'Accept: application/json' \
     -d $'{
          "from": { "type": "sms", "number": "$FROM_NUMBER" },
          "to": { "type": "sms", "number": "$TO_NUMBER" },
          "message": {
            "content": {
              "type": "text",
              "text": "This is an SMS sent from the Messages API"

View full source

Run your code

Save this file to your machine and run it:



Code Snippets


Use Cases