Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Note

MailUp transactional API for SMS does not use OAuth 2.0, please refer to "Getting started" section here below.


The MailUp transactional API for text messages (SMS) is the best choice when you have to send single messages, regardless 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 on http post, then you can use the "send" command as a callback function into a system that supports webhooks

 

Getting started

Security is managed by means of 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 , which is that has been added to enforce the security level, it is list specific and it can be enabled/disabled using APIs.

You can perform GET, POST, DELETE on /lists/{List_ID}/listsecret resource, Basic Authentication is required.use GET method to check if a ListSecret is already configured (if not, you should use the POST method). 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 transactional APIs, you can use DELETE method, which can also be used, when followed by a POST method, to change the ListSecret value. 


All these methods require Basic Authentication, hence an encoded value must be specified as header

Code Block
Format: "Authorization: Basic " + Base64(username:password)
Example: username=m1234, password=hello123, Base64(m1234:hello123)=bTEyMzQ6aGVsbG8xMjM=  => Authorization: Basic bTEyMzQ6aGVsbG8xMjM=

 

 

Expand
titleGET - Read ListSecret
Code Block
languagegroovy
-- Request
GET https://sendsms.mailup.com/api/v2.0/lists/1/listsecret HTTP/1.1
User-Agent: Fiddler
Authorization: Basic aBcDeFgHiLmNoPqRsTuVz
Host: sendsms.mailup.com
Content-Length: 0
 
-- Response 1 (when ListSecret does not exist)
HTTP/1.1 200 OK
Content-Length: 71
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 09 Mar 2016 16:39:24 GMT
{"Data":{"ListSecret":null},"Code":"0","Description":"","State":"DONE"}
 
-- Response 2 (when ListSecret exists)
HTTP/1.1 200 OK
Content-Length: 105
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 09 Mar 2016 16:45:39 GMT
{"Data":{"ListSecret":""yyyyyyyy-ddd-eeee-ffff-3e1cb0e6e64c"},"Code":"0","Description":"","State":"DONE"}

...

Expand
titleDELETE - Remove ListSecret
Code Block
languagegroovy
DELETE https://sendsms.mailup.com/api/v2.0/lists/1/listsecret?listGUID=xxxxxxxx-aaa-bbbb-cccc-e3a98b626156 HTTP/1.1
User-Agent: Fiddler
Authorization: Basic aBcDeFgHiLmNoPqRsTuVz
Host: sendsms.mailup.com
Content-Length: 0


You can use GET method to check if a ListSecret is already configured (if not, you should use POST method). 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 transactional APIs, you can use DELETE method, which can also be used, when followed by a POST method, to change the ListSecret value 

 

How to send an SMS

Once you have the value of ListSecret, you can start sending text messages and basic authentication is no more required. The example below sends an SMS to number +393350000001

...