Sign Up

Log In

Nexmo SMS Messaging

PAID
By nexmoOfficial
Updated 15 days ago
SMS
6.1/10
Popularity Score
937ms
Latency
92%
Success Rate

Nexmo SMS Messaging API Documentation

ANNOUNCEMENT: Nexmo SMS API currently only available to send SMS messages to countries that don't require a virtual number. (Ex/ Japan)

Nexmo's SMS API allows you to send and receive text messages to users around the globe through simple RESTful APIs.

View API Details

Supercharge your App

Discover and connect to thousands of APIs in the world's largest API Hub

SMS
POSTSend an SMS
Pricing
GETPricing by Country Code
GETPricing by Phone Number
POSTSend an SMS

Nexmo's SMS API allows you to send and receive text messages to users around the globe through simple RESTful APIs.

Sign up to test this endpoint
Log in
Header Parameters
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
fromSTRING
REQUIREDThe name or number the message should be sent from. Alphanumeric senderID's are not supported in all countries, see Global Messaging (https://developer.nexmo.com/messaging/sms/guides/global-messaging#country-specific-features) for more details.
toSTRING
REQUIREDThe number you are sending the SMS to in E.164 format. For example 447700900000. (Requires the country code prefix)
Optional Parameters
textSTRING
OPTIONALThe body of the message being sent. If your message contains characters that can be encoded according to the GSM Standard and Extended tables then you can set the type to text. If your message contains characters outside this range, then you will need to set the type to unicode.
typeSTRING
OPTIONALAdvanced: The format of the message body. Must be one of: text, binary, wappush, unicode, vcalorvcard
ttlNUMBER
OPTIONALAdvanced: The duration in milliseconds the delivery of an SMS will be attempted. By default Nexmo attempt delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours. We recommend this value should be kept at its default or at least 30 minutes. Must be between 20000 and 604800000
messageclassNUMBER
OPTIONALAdvanced: The Data Coding Scheme value of the message Must be one of: 0, 1, 2 or 3
vcardSTRING
OPTIONALAdvanced: A business card in vCard format(https://en.wikipedia.org/wiki/VCard) . Depends on type parameter having the value vcard.
vcalSTRING
OPTIONALAdvanced: A calendar event in vCal format (https://en.wikipedia.org/wiki/VCal). Depends on type parameter having the value vcal.
bodySTRING
OPTIONALAdvanced: Hex encoded binary data. Depends on type parameter having the value binary.
udhSTRING
OPTIONALAdvanced: Your custom Hex encoded User Data Header (https://en.wikipedia.org/wiki/User_Data_Header). Depends on type parameter having the value binary.
protocolIdNUMBER
OPTIONALAdvanced: The value of the protocol identifier (https://en.wikipedia.org/wiki/GSM_03.40#Protocol_Identifier) to use. Ensure that the value is aligned with udh.
titleSTRING
OPTIONALAdvanced: The title for a wappush SMS. Depends on type parameter having the value wappush.
urlSTRING
OPTIONALAdvanced: The URL of your website. Depends on type parameter having the value wappush.
validitySTRING
OPTIONALAdvanced: The availability for an SMS in milliseconds. Depends on type parameter having the value wappush.
clientRefSTRING
OPTIONALAdvanced: You can optionally include your own reference of up to 40 characters.
Request Snippet
unirest.post("https://nexmo-nexmo-messaging-v1.p.rapidapi.com/send-sms?text=undefined&type=undefined&ttl=undefined&messageclass=undefined&vcard=undefined&vcal=undefined&body=undefined&udh=undefined&protocolId=undefined&title=undefined&url=undefined&validity=undefined&clientRef=undefined")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response

loading...

Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://nexmo-nexmo-messaging-v1.p.rapidapi.com/send-sms?text=undefined&type=undefined&ttl=undefined&messageclass=undefined&vcard=undefined&vcal=undefined&body=undefined&udh=undefined&protocolId=undefined&title=undefined&url=undefined&validity=undefined&clientRef=undefined")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication
Sign up for freeto test this endpoint
Join the world’s largest API marketplace with over half a million developers and thousands of APIs.
DiscoverAPIs
Testfrom the browser
Connectusing code snippets
Managefrom one dashboard