Nexmo SMS Messaging

FREEMIUM
By nexmoOfficial
Updated 15 days ago
SMS
9.6/10
Popularity Score
218ms
Latency
100%
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
SMS
POSTSend an SMS
Pricing
GETPricing by Country Code
GETPricing by Phone Number
Testing
POSTAdd Headers
POSTTest
GETSearch Numbers
POSTSend an SMS

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

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
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.
Code Snippet
Response ExampleSchema

Install SDK for (Node.js)Unirest

OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication