Transactional SMS using APIs
The MailUp transactional API for SMS does not use OAuth 2.0. Please refer to the "Getting started" section below for details.
Overview
The MailUp transactional API for text messages (SMS) is the best choice when sending individual text messages, regardless of the number of messages you need to send.
The main features of this API are the following:
sending is immediate
authentication is very simple
it works with HTTP post, which means that you can use the "send" command as a callback function in any system that supports webhooks
Getting started
Using the ListSecret parameter
In order to send an SMS you need to know the "ListSecret" value of the MailUp list you are using. "ListSecret" is an additional field that has been added to introduce a level of security to these API methods, it is list specific and it can be enabled/disabled using APIs.
You can use the GET method to check if a ListSecret already exists.
If it does not, you can use the POST method to create it.
As soon as you get the value of ListSecret you can start sending text messages (refer to next paragraph) with no restrictions.
If you want to disable the ability to send transactional SMS on that list, you can use DELETE method. This method can also be used - followed by a POST method - to change an existing ListSecret value.
All these methods require Basic Authentication, hence an encoded value must be specified as header
Format: "Authorization: Basic " + Base64(username:password)
Example: username=m1234, password=hello123, Base64(m1234:hello123)=bTEyMzQ6aGVsbG8xMjM= => Authorization: Basic bTEyMzQ6aGVsbG8xMjM=
Once you have obtained the value of the ListSecret parameter:
you can start sending transactional text messages (see example below)
basic authentication is no longer required in those API calls
Retrieving, creating, and deleting the ListSecret parameter
Sending a transactional SMS
The example below sends an SMS to the number +393350000001
Request
POST https://sendsms.mailup.com/api/v2.0/sms/{account_ID}/{List_ID} HTTP/1.1
User-Agent: Fiddler
Host: sendsms.mailup.com
Content-Type: application/json;odata=verbose;charset=utf-8
Content-Length: 428
{
"Content":"Hi [Name], welcome to [City]",
"ListGuid":"xxxxxxxx-aaa-bbbb-cccc-e3a98b626156",
"ListSecret":"yyyyyyyy-ddd-eeee-ffff-3e1cb0e6e64c",
"Recipient":"+393350000001",
"CampaignCode":"Welcome messages",
"DynamicFields":[{"N":"Name","V":"John"},{"N":"City","V":"Cremona"}],
"isUnicode":0
}