Versions Compared

Key

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

This page provides you information about how to use MailUp REST API to create email text messages and *SMSand to send them to specified recipients.

...

Please note that, when creating a new email text message, any referenced tag or attachment must be created in advance for that list. 

Known limitations:

  • Any text between square brackets must match with the name of a dynamic field that is available for that account
  • In some countries, like Italy, some restrictions on SMS senders apply. Use MailUp admin console to verify if the specified sender is subject to limitations in some countries
  • MailUp REST API applies on Sender field looser format restrictions than the admin console.

Description

Create a new text message

HTTP Method

POST

URL

Code Block
languagexml
https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Sms/List/{id_List}/Message
Reference

Go to automated doc

Expand
titleClick here to learn more about request parameters
Field NameTypeDescription
 SubjectStringMessage title (for MailUp users only, it will not be visible to recipients)
 idListIntegerList ID
ContentStringMessage content
Fields

Array of objects [0..39].
Each object is composed of
the following fields:  

  • Description (String, optional)
  • Id (Integer, from 1 to 39)
  • Value (String)

Each array object will be used to fill the correspondent dynamic field when its value has been left empty or blank.

NotesStringMessage notes (for MailUp users only, it will not be visible to recipients)
TagsArray of objects
Each object is composed of
the following fields:  
  • Enabled (Boolean)
  • Id (Integer, from 1 to 39)
  • Value (String)

Optional field, used to link existing tags to the text message.

Tags can be used to classify messages, please check this page for more details about tags

IsUnicodeBooleanFalse if message contains only letters or symbols that belong to Western alphabet (GSM charset).
True if at least one message character belongs to a non-western alphabet (Unicode)
SenderString

Message sender. It can be a phone number (e.g. +393351234567) or a string (up to 11 chars,

only letters and number). Please note that in some country, like Italy, some restrictions on SMS senders apply.

Use MailUp admin console to verify if the specified sender is subject to limitations in some countries.

If you leave this field empty a random numeric value will be applied.

JSON request (example)

Expand

In this case recipients with an empty field as "FirstName" will receive "Hello dear customer, your appointment is confirmed for today at 5PM, Main Building 1st floor"
from "ABCandCO"

Code Block
languagexml
{
    "Subject":"Appointment #1",
    "idList":2,
    "Content":"Hello [firstname], your appointment is confirmed for today at 5PM, Main Building 1st floor",
    "Fields":[{
               "Id":1,
               "Value":"dear customer"
             }],
    "Notes":"Appointment is confirmed",
    "IsUnicode":false,
    "Sender":"ABCandCO"
}

JSON response (example)

Code Block
languagexml
{
   "Subject" : "Appointment #1",
   "idList" : 1,
   "idMessage" : 2
}

 

 

Paging and filtering (example)

 

 

...

SMS Statistics

Summary report

...

DescriptionRetrieve the SMS message sending report by specifying SMS ID.

HTTP Method

GET

URL


Code Block
languagexml
https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Sms/{id_Message}/Sendings/Report
ReferenceGo to automated doc

JSON request (example)

none

JSON response (example)

Expand
StartDate = timestamp for mailing start
EndDate = timestamp for mailing start
Duration = mailing duration (from start to end dates)
IsCompleted = true if mailing is finished
TotalCost = number of spent credits
TotalMessagesSent = number of messages that compose the mailing (a concatenated message is treated as a single message)
TotalSmsSent = number of billed messages (a concatenated message is billed as a multiple message)

 

Code Block
languagexml
{
   "Duration" : "00:00:06.4270000",
   "EndDate" : "2014-11-27 10:35:49Z",
   "IsCompleted" : true,
   "StartDate" : "2014-11-27 10:35:43Z",
   "TotalCost" : 2,
   "TotalMessagesSent" : 1,
   "TotalSmsSent" : 2
}

Paging and filtering (example)

 

Detailed report

Known limitations (see response example: in this case the expected results were 16, not 9 and TotalElementCount is empty):

  • response is truncated
  • paging and filtering are not working
DescriptionRetrieve the SMS message sending report details by specifying SMS ID.

HTTP Method

GET

URL


Code Block
languagexml
https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Sms/{ID_MESSAGE}/Sendings/ReportDetails
ReferenceGo to automated doc

JSON request (example)

none

JSON response (example)

Expand
ErrorCode = operation result (FAILED, UNKNOWN, NACK, UNDELIV, REJECTD, EXPIRED) + specific error code
Receiver = recipient's phone number, international prefix is specified uning neither '+' nor '00' 
SentDate = sent date and time (UTC time zone)
Status = 0 (delivered), 1 (queued), 2 (error)

Code Block
{"IsPaginated":false,"Items":[
{"ErrorCode":"FAILED_AT_004","Receiver":"393483188013","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"FAILED_AT_004","Receiver":"393408591407","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"FAILED_AT_004","Receiver":"393285625125","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"FAILED_AT_004","Receiver":"393404905734","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"FAILED_AT_004","Receiver":"393391737555","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"","Receiver":"393486532270","SentDate":"2015-01-29 14:11:10Z","Status":0},
{"ErrorCode":"","Receiver":"393493546320","SentDate":"2015-01-29 14:11:10Z","Status":0},
{"ErrorCode":"FAILED_AT_004","Receiver":"393471560960","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"","Receiver":"393334942402","SentDate":"2015-01-29 14:11:10Z","Status":0}
],"PageNumber":0,"PageSize":0,"Skipped":0,"TotalElementsCount":0}

Paging and filtering (example)