Versions Compared

Key

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

...

Please note that, when creating a new text message, any referenced tag 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 alphanumeric senders, looser format restrictions than the admin console. While admin console allows only letters and numbers, API also allow spaces, puntuaction and other special characters. Please consider that letters and numbers are supported by any carrier, while other characters may be replaced in some cases. It is recommended that you perform some tests before using a sender with spaces, puntuaction or special characters
  • In case of empty Sender the default list settings are not applied, a random numeric sender is used instead

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)

 

 

...

  • scheduled date and time cannot be modified
  • at the moment there is no way to move from immediate/scheduled queues to "waiting to be sent" queue
  • you can move to "immediate send" queue but you cannot start immediate sending using API
  • when moving to deferred queue (POST /Console/Sms/Sendings/{id_Sending}/Deferred) date and time is set but it is not visible on admin console
DescriptionQuery the send queue

HTTP Method

GET, POST

URL


Code Block
languagexml
<!-- Retrieve the status of sms sending queues for immediate scheduled dispatches -->
GET https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Sms/Sendings/Immediate

<!-- Retrieve the status of sms sending queues for deferred scheduled dispatches -->
GET https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Sms/Sendings/Deferred

<!-- Retrieves the status of sms sending queues for dispatches to be scheduled -->
GET https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Sms/Sendings/Undefined

<!-- Retrieves the earliest date and time to schedule the given sending task -->
GET https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Sms/Sending/{id_Sending}/Deferred

<!-- Move from "waiting to be sent" to "immediate sending" queue (without starting send) -->
POST https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Sms/Sendings/{id_Sending}/Immediate 

<!-- Move from "waiting to be sent" to "scheduled sending" queue (scheduled date and time is passed as POST parameter) -->
POST https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Sms/Sendings/{id_Sending}/Deferred
ReferenceGo to automated doc (all operations)

JSON request (example)

Expand

Request example for POST /Console/Sms/Sendings/{id_Sending}/Deferred

Code Block
languagexml
{
    "Date":"2015-02-19 14:41:46Z"
}

JSON response (example)

Expand
Code Block
languagexml
titleImmediate
 {"IsPaginated":false,"Items":[{"Id":74,"IdList":10,"IdMessage":41,"Notes":"","StartDate":"","State":"Running","Subject":"Welcome","Type":"Immediate"}],"PageNumber":0,"PageSize":20,"Skipped":0,"TotalElementsCount":1}
Code Block
languagexml
titleDeferred
{"IsPaginated":false,"Items":[
{"Id":72,"IdList":10,"IdMessage":29,"Notes":"This is a test message","StartDate":"2015-02-12 17:00:00Z","State":"Queued","Subject":"Test #1","Type":"Deferred"},{"Id":73,"IdList":3,"IdMessage":19,"Notes":"","StartDate":"2015-03-02 15:00:00Z","State":"Queued","Subject":"Customer credentials","Type":"Deferred"}
],"PageNumber":0,"PageSize":20,"Skipped":0,"TotalElementsCount":2}
Code Block
titleUndefined
{"IsPaginated":false,"Items":[
{"Id":36,"IdList":8,"IdMessage":12,"Notes":"msg to be sent after 3 warnings", "StartDate":null,"State":"ToBePlanned","Subject":"Final notice", "Type":"Undefined"},
{"Id":44,"IdList":3,"IdMessage":4,"Notes":"","StartDate":null,"State":"ToBePlanned","Subject":"Valentine's day","Type":"Undefined"},{"Id":46,"IdList":2,"IdMessage":14,"Notes":"","StartDate":null,"State":"ToBePlanned","Subject":"Welcome","Type":"Undefined"},{"Id":52,"IdList":2,"IdMessage":18,"Notes":"","StartDate":null,"State":"ToBePlanned","Subject":"Happy birthday","Type":"Undefined"},{"Id":48,"IdList":2,"IdMessage":15,"Notes":"","StartDate":null,"State":"ToBePlanned","Subject":"Season greetings","Type":"Undefined"},{"Id":71,"IdList":10,"IdMessage":30,"Notes":"","StartDate":null,"State":"ToBePlanned","Subject":"Password reminder","Type":"Undefined"}
],"PageNumber":0,"PageSize":20,"Skipped":0,"TotalElementsCount":6}
Code Block
titleEarliest date and time
"2015-02-09 14:41:46Z"
Code Block
titleMoved from waiting to immedate
{"Id":74,"IdList":10,"IdMessage":41,"Notes":"","StartDate":"","State":"Running","Subject":"Welcome","Type":"Immediate"}
Code Block
titleMoved from waining to deferred
{"Id":74,"IdList":10,"IdMessage":41,"Notes":"","StartDate":"2015-02-19 14:41:46Z","State":"Queued","Subject":"Welcome","Type":"Deferred"}

Paging and filtering (example)

 

...

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 filtering is not working
  • isCompleted field is useless
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":"391111111111","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"FAILED_AT_004","Receiver":"392222222222","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"FAILED_AT_004","Receiver":"393333333333","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"FAILED_AT_004","Receiver":"394444444444","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"FAILED_AT_004","Receiver":"395555555555","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"","Receiver":"396666666666","SentDate":"2015-01-29 14:11:10Z","Status":0},
{"ErrorCode":"","Receiver":"397777777777","SentDate":"2015-01-29 14:11:10Z","Status":0},
{"ErrorCode":"FAILED_AT_004","Receiver":"398888888888","SentDate":"2015-01-29 14:11:10Z","Status":2},
{"ErrorCode":"","Receiver":"399999999999","SentDate":"2015-01-29 14:11:10Z","Status":0}
],"PageNumber":0,"PageSize":0,"Skipped":0,"TotalElementsCount":0}

Paging and filtering (example)

 

...