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 messages and to send them to specified recipients.

 

On this page:

Toc

 

Opens

An email message is always created inside the environment of a MailUp list, so it cannot be managed outside of that list.

Create a message

Description

 

HTTP Method

POST

URL

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

JSON request (example)

Expand

 

JSON response (example)

 

 

Paging and filtering (example)

 

 

List Messages

Description 

HTTP Method

GET

URL

Retreive all email messages of that list

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

 

Retreive only email messages that have been published (i.e. with public visibility, see details)

Code Block
https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/List/{id_List}/Online/Emails

JSON request (example)

none

JSON response (example)

Expand
Code Block
{"IsPaginated":false,"Items":[{"Subject":"test","idList":2,"idMessage":29},{"Subject":"Explore the new feature of List Plus","idList":2,"idMessage":28},{"Subject":"Testing List Plus","idList":2,"idMessage":27},{"Subject":"Triggered news from MailUp Blog","idList":2,"idMessage":8}],"PageNumber":0,"PageSize":20,"Skipped":0,"TotalElementsCount":4}

 

 

Paging and filtering (example)

2 items per page, get first page (count starts from zero)

  • https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/List/2/Emails?PageNumber=0&PageSize=2

Retreive messages that contain the word "test" in the subject field and order by ID. Note: search by text is case sensitive

  • https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/List/2/Emails?filterby="Subject.Contains(%27test%27)"&orderby="idMessage+asc"

Read message details

...

HTTP Method

...

GET

...

URL

...

get email statistics by message and by recipient.

Info
titleBest Practices

Email Statistics use a different "base URL" than methods that can be used to manage your console account resources. Caller application should handle three distinct base URL when working with REST API ("Console", "Statistics" and "Public")

Use of paging for email statistics is strongly recommended because in some cases the size of returned data could be really big (i.e. caller applications may experience either response time that are longer than expected or errors that are related to maximum data size restrictions on the infrastructure that hosts the caller). By implementing paging, a developer is able to test the caller application in its edge cases, in such a way that even huge number of opens, delivered emails or clicks do not represent a problem.

 

 

On this page:

Toc

 

...

Get Statistics by Message

This section enables you to get statistics of an email message by specifying its ID. You can get message IDs by using List Messages method. For each type of statistics by message both a "COUNT" method (only the total number) and a "LIST" method (all available details) are provided.

If you reuse a specified message and perform more sendings with it you should be aware that message statistics of a specific sending cannot be handled separately from the statistics of the other sendings of the same message. If you need to separate the statistics of each sending it is recommended that you clone (i.e. make a copy of the message) whenever you are planning a new campaign.

Read message recipients

Please note that message recipients are kept inside MailUp only for 15 days, after that period COUNT returns zero and LIST returns an empty array.

Description

Get recipients that received the specified message

HTTP Method

GET

URL

Get the number of recipients that received the specified message (COUNT)

Code Block
https://services.mailup.com/API/v1.1/Rest/ConsoleServiceMailStatisticsService.svc/Console/ListMessage/{idID_ListMESSAGE}/Email/{id_Message}
 
Count/Recipients


Get attachment list for the specified message ida list of email addresses that received specified message (LIST, pagination is set as default with pageSize=20)

Code Block
https://services.mailup.com/API/v1.1/Rest/ConsoleServiceMailStatisticsService.svc/Console/ListMessage/{idID_ListMESSAGE}/Email/{id_Message}/AttachmentList/Recipients

JSON request (example)

none

JSON response (example)

...

Paging and filtering (example)

Manage email attachments

...

HTTP Method

...

GET

...

URL

...

 

...

JSON request (example)

...

none

...

JSON response (example)

...

 

...

Paging and filtering (example)

 

Send Email Messages

Send to all subscribers

...

HTTP Method

...

POST

...

URL

...

 

...

JSON request (example)

...

none

...

JSON response (example)

...

 

...

Paging and filtering (example)

Send to a group

...

HTTP Method

...

POST

...

URL

...

 

...

JSON request (example)

...

none

...

JSON response (example)

...

 

...

Paging and filtering (example)

Send to a recipient

...

HTTP Method

...

POST

...

URL

...

 

...

JSON request (example)

...

none

...

JSON response (example)

...

 

...

Paging and filtering (example)

Retreive sending history

An email message can be sent several times. This feature allows to retreive details about each sending.

Description 

HTTP Method

GET

URL

/Console/List/{id_List}/Email/{id_Message}/SendHistory

JSON request (example)

none

JSON response (example)

COUNT method simply return the number of delivered messages (e.g. 103)

LIST method returns a paged list

Expand
Code Block
{"SubjectIsPaginated":"Monthly Newsletter"true,"idListItems":2,[{"idMessageEmail":24,"Content":"
<table><tbody><tr><td><strong>Image</strong>&nbsp;</td><td><strong>Text</strong>&nbsp;</td></tr><tr><td style="width: 200px; height: 70px;">&nbsp;<img src="http://d0i4f.s57.it/images/2/ListImages/sociallogin.PNG" alt="This text is visible if you do not see images" title="SocialLogin" longdesc="Social Login Image" width="200" height="70"></td><td>&nbsp;This screenshot shows you how to perform login with social networks<br>&nbsp;(see <a href="http://[track]/https://help.mailup.com" target="_blank" id="User" s="" manual'="">manual</a>)&nbsp;</td></tr></tbody></table>
","Embed":false,"Fields":[{"Description":"FirstName","Id":1,"Value":""},{"Description":"LastName","Id":2,"Value":""},{"Description":"Company","Id":3,"Value":""},{"Description":"City","Id":4,"Value":""},{"Description":"Province","Id":5,"Value":""},{"Description":"ZIP","Id":6,"Value":""},{"Description":"State","Id":7,"Value":""},{"Description":"Region","Id":8,"Value":""},{"Description":"Address","Id":9,"Value":""},{"Description":"Gender ","Id":10,"Value":""},{"Description":"phone","Id":11,"Value":""},{"Description":"CustomerID","Id":12,"Value":""},{"Description":"LatestOrderID","Id":13,"Value":""},{"Description":"LatestOrderDate","Id":14,"Value":""},{"Description":"LatestOrderAmount","Id":15,"Value":""},{"Description":"LatestOrderProductIDs","Id":16,"Value":""},{"Description":"LatestOrderCategoryIDs","Id":17,"Value":""},{"Description":"LatestShippedOrderDate","Id":18,"Value":""},{"Description":"LatestShippedOrderID","Id":19,"Value":""},{"Description":"LatestAbandonedCartDate","Id":20,"Value":""},{"Description":"LatestAbandonedCartTotal","Id":21,"Value":""},{"Description":"LatestAbandonedCartID","Id":22,"Value":""},{"Description":"TotalOrdered","Id":23,"Value":""},{"Description":"TotalOrderedLast12m","Id":24,"Value":""},{"Description":"TotalOrderedLast30d","Id":25,"Value":""},{"Description":"AllOrderedProductIDs","Id":26,"Value":""},{"Description":"WantsBlogUpdate","Id":27,"Value":""}],"IsConfirmation":false,"Notes":"Issue n. 5 May 2014","Tags":[{"Enabled":false,"Id":5,"Name":"news"},{"Enabled":false,"Id":4,"Name":"users-manual"}],"TrackingInfo":{"CustomParams":"","Enabled":true,"Protocols":["http:","https:","ftp:","news:"]},"Attachments":[{"Name":"24\/jp.txt","Path":"http:\/\/d0i4f.s57.it\\d0i4f\\download\\24\\24\/jp.txt","Slot":1}]}

 

 

Paging and filtering (example)

2 items per page, get first page (count starts from zero)

Retreive messages that contain the word "test" in the subject field and order by ID. Note: search by text is case sensitive

Update message

Description 

HTTP Method

GET

URL

 

JSON request (example)

none

JSON response (example)

 

Paging and filtering (example)

 

Manage tags

...

HTTP Method

...

GET

...

URL

...

 

...

JSON request (example)

...

none

...

JSON response (example)

...

 

Expand

An email message has been sent three times with different senders, here below the results

Code Block
{"IsPaginated":false,"Items":[{"EndDate":"2014-04-01 13:53:06Z","Kb_transferred":6302,"Recipients":1,"SenderEmail":"marketing@example.com","SenderName":"Your Dealer","StartDate":"2014-04-01 13:52:35Z","idMessage":12},{"EndDate":"2014-04-01 13:54:32Z","Kb_transferred":12604,"Recipients":2,"SenderEmail":"brown@example.com","SenderName":"Mike Brown","StartDate":"2014-04-01 13:53:57Z","idMessage":12},{"EndDate":"2014-04-06 13:48:33Z","Kb_transferred":12604,"Recipients":2,"SenderEmail":"sales@example.com","SenderName":"Sales","StartDate":"2014-04-06 13:48:04Z","idMessage":12"tim@example.com","IdMessage":11826,"IdRecipient":1405754},{"Email":"mary@example.com","IdMessage":11826,"IdRecipient":1403161},{"Email":"jack@example.com","IdMessage":11826,"IdRecipient":1392647},{"Email":"marta@example.com","IdMessage":11826,"IdRecipient":1390174},{"Email":"robert@example.com","IdMessage":11826,"IdRecipient":1389856},{"Email":"susan@example.com","IdMessage":11826,"IdRecipient":1386049},{"Email":"patrick@example.com","IdMessage":11826,"IdRecipient":1386048},{"Email":"markus@example.com","IdMessage":11826,"IdRecipient":1386047},{"Email":"bernardo@example.com","IdMessage":11826,"IdRecipient":1386046},{"Email":"cindy@example.com","IdMessage":11826,"IdRecipient":1385588},{"Email":"alexander@example.com","IdMessage":11826,"IdRecipient":1381517},{"Email":"naomi@example.com","IdMessage":11826,"IdRecipient":1377532},{"Email":"jimmy@example.com","IdMessage":11826,"IdRecipient":1377528},{"Email":"tony@networkweb.net","IdMessage":11826,"IdRecipient":1377527},{"Email":"larry@example.com","IdMessage":11826,"IdRecipient":1377520},{"Email":"pamela@example.com","IdMessage":11826,"IdRecipient":1377516},{"Email":"martin@example.com","IdMessage":11826,"IdRecipient":1377047},{"Email":"jenny@example.com","IdMessage":11826,"IdRecipient":1376721},{"Email":"george@example.com","IdMessage":11826,"IdRecipient":1376600},{"Email":"david@example.com","IdMessage":11826,"IdRecipient":374939}],"PageNumber":0,"PageSize":20,"Skipped":0,"TotalElementsCount":354}

 

 

 

Paging and filtering (example)

N/A