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:

Table of Contents

 

Email messages

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

...

Retrieve the email details by specified id

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

 

Get attachment list for the specified message id

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

...

JSON request (example)

...

none

...

JSON response (example)

...

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:

Table of Contents

 

...

Email messages

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

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

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

  • Description 

    HTTP Method

    GET

    URL

    Retrieve the email details by specified id

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

     

    Get attachment list for the specified message id

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

    JSON request (example)

    none

    JSON response (example)

    Description

    Check subscriber and retreive data

    HTTP Method

    GET

    URL

    https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/List/3/Recipients/Subscribed?filterby="Email.Contains('{Email}')"

    see example in the "paging and filtering" row

    JSON request (example)

    none

     

    JSON response (example)

    Expand
    Code Block
    {"Subject":"Monthly Newsletter","idList":2,"idMessage":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":"LastNameTotalOrderedLast12m","Id":224,"Value":""},{"Description":"CompanyTotalOrderedLast30d","Id":325,"Value":""},{"Description":"CityAllOrderedProductIDs","Id":426,"Value":""},{"Description":"ProvinceWantsBlogUpdate","Id":527,"Value":""}],{"DescriptionIsConfirmation":false,"ZIPNotes","Id":6,"Value":""},{"Description":"State":"Issue n. 5 May 2014","Tags":[{"Enabled":false,"Id":75,"ValueName":"news"},{"DescriptionEnabled":"Region"false,"Id":84,"ValueName":"users-manual"}],"TrackingInfo":{"DescriptionCustomParams":"Address","IdEnabled":9true,"ValueProtocols":["http:"},{"Description"https:"Gender ","Idftp:":10,"Value"news:""]},"Attachments":[{"DescriptionName":"phone24\/jp.txt","IdPath":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)

    Update message

    Retrieve all subscribed/unsubscribed/pending recipients from a list

    For each MailUp list and for each channel, these are the available subscription conditions:

    • subscribed 
    • unsubscribed
    • pending
    • not subscribed (has one of the status listed above at least in another list of that account)

    "Unsubscribed" and "pending" conditions apply only to lists, not to groups. 

    Read subscribed recipients on Email channel

    Description

    Retreive subscribers of specified list

    HTTP Method

    GET

    URL

    Code Block
    https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/List/{ID_LIST}/Recipients/Subscribed

    JSON request (example)

    none

    JSON response (example)

    Expand
    Code Block
    languagehtml/xml
    {"IsPaginated":false,"Items":[{"Email":"john@example.com","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":""}],"MobileNumber":null,"MobilePrefix":null,"Name":null,"idRecipient":16},{"Email":"mary@example.com","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":""}],"MobileNumber":null,"MobilePrefix":null,"Name":null,"idRecipient":15},{"Email":"susan@example.com","Fields":[{"Description":"FirstName","Id":1,"Value":"Susan"},{"Description":"LastName","Id":2,"Value":"Smith"},{"Description":"Company","Id":3,"Value":"ACME"},{"Description":"City","Id":4,"Value":"Milan"},{"Description":"Province","Id":5,"Value":"MI"},{"Description":"ZIP","Id":6,"Value":"20100"},{"Description":"State","Id":7,"Value":"Italy"},{"Description":"Region","Id":8,"Value":""},{"Description":"Address","Id":9,"Value":""},{"Description":"Gender ","Id":10,"Value":"male"},{"Description":"phone","Id":11,"Value":"1234567"},{"Description":"CustomerID","Id":12,"Value":"1"},{"Description":"LatestOrderID","Id":13,"Value":"6"},{"Description":"LatestOrderDate","Id":14,"Value":"1397470773"},{"Description":"LatestOrderAmount","Id":15,"Value":"1000"},{"Description":"LatestOrderProductIDs","Id":16,"Value":"1"},{"Description":"LatestOrderCategoryIDs","Id":17,"Value":"1"},{"Description":"LatestShippedOrderDate","Id":18,"Value":"1397470973"},{"Description":"LatestShippedOrderID","Id":19,"Value":"6"},{"Description":"LatestAbandonedCartDate","Id":20,"Value":"1397468462"},{"Description":"LatestAbandonedCartTotal","Id":21,"Value":"200"},{"Description":"LatestAbandonedCartID","Id":22,"Value":"1"},{"Description":"TotalOrdered","Id":23,"Value":"1200"},{"Description":"TotalOrderedLast12m","Id":24,"Value":"1200"},{"Description":"TotalOrderedLast30d","Id":25,"Value":"1200"},{"Description":"AllOrderedProductIDs","Id":26,"Value":"1,2"}],"MobileNumber":"","MobilePrefix":"","Name":"Test","idRecipient":14},{"Email":"peter@example.com","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":""}],"MobileNumber":null,"MobilePrefix":null,"Name":null,"idRecipient":13}],"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/1/Recipients/Subscribed?PageNumber=0&PageSize=2

    Retreive all the subscribers of a specified list whose Email contains 'example' filterby="Email.Contains('example')" and sort them by Email orderby="Email asc". Parameter names can be retreived from the response body. Please note that "Contains" is case sensitive.

    • https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/List/1/Recipients/Subscribed?filterby="Email.Contains(%27example%27)"&orderby="Email+asc"

     

     

    Read unsubscribed recipients on Email channel

    As for "subscribed", but in this case the endpoint is /Console/List/{ID_LIST}/Recipients/Unsubscribed. 

    Code Block
    GET https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/List/{ID_LIST}/Recipients/Unsubscribed

    Read pending recipients on Email channel

    As for "subscribed", but in this case the endpoint is /Console/List/{ID_LIST}/Recipients/Pending. 

    Code Block
    GET https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/List/{ID_LIST}/Recipients/Pending

    Retrieve recipients that belong to a group

    A recipient can belong to zero, one or more groups of a list, regardless its subscription status in that list. 

    Read group members

    Description

    Retreive only email subscribers that belong to specified group. Group members that are not subscribed on email channel are not returned

    HTTP Method

    GET

    URL

    Code Block
    https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Group/{id_Group}/Recipients

    JSON request (example)

    none

    JSON response (example)

    Expand
    Code Block
    languagehtml/xml
    {"IsPaginated":false,"Items":[{"Email":"peter@example.com","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":""}],"MobileNumber":null,"MobilePrefix":null,"Name":null,"idRecipient":13}],"PageNumber":0,"PageSize":20,"Skipped":0,"TotalElementsCount":1}

    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/Group/27/Recipients?PageNumber=0&PageSize=2

    Retreive all the subscribers of a specified list whose Email contains 'example' filterby="Email.Contains('example')" and sort them by Email orderby="Email asc". Parameter names can be retreived from the response body. Please note that "Contains" is case sensitive.

    • https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Group/27/Recipients?filterby="Email.Contains(%27example%27)"&orderby="Email+asc"

     

     

    Asynchronous import of recipients

    Asynchronous import is used either for adding a single recipient to MailUp or to perform a bulk import.
    Since it's not synchronous, it is fast but not immediate, please check the import status in order to know when the import task is completed. 

    Note

    In case of bulk import, the upper limit for parameter size is configured as 500MB for each call. In any case we recommend to set a configurable upload size limit in your application and make a test with this size. When parameter size exceeds this limit you can split the list of recipients in more blocks and perform more requests. When more import requests are pending, MailUp processes them in a sequential order.

    Import recipients

    Description

    Create and execute a task that imports specified recipients. Import task ID is returned

    Expand
    titleClick here to see how already existing recipients are managed ...
    • Brand new recipents are added and subscribed to the list
    • Recipents that exist on other lists are subscribed to the list
    • Already subscribed recipents remain subscribed
    • Previously unsubscribed or pending recipients are updated but their subscription status does not change
    • If the recipient alrady exists it is updated if specified personal data are different from the specified ones. Empty fields are managed as "do not change"
    • Please refer to management of single recipient if you want to access to more advanced features like forcing subscription/unsubsubscription or if you want to clear a personal data field

    HTTP Method

    POST

    URL

    Import recipients into a list

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

     

    Import recipients into a group (a group always belongs to a single list)

    Code Block
    https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Group/{ID_GROUP}/Recipients

    JSON request (example)

    Expand

    The example below imports two recipients. For each recipient to be imported you may specify a different set of "Fields" values. Please note that field value names are configurable and default values are language specific, therefore names in your console account can be different than what you see below

    Code Block
    languagehtml/xml
    [{
    "Email":"john@doe.com",
    "Name":"john doe",
    "Fields":{
    "FirstName":"john",
    "LastName":"doe",
    "Company":"john's Uber Awesome Company",
    "Phone":"1115559999",
    "LatestOrderId":1000,
    "LatestOrderDate":"2013-12-13T16:52:08.3112622Z",
    "LatestOrderAmount":100.99,
    "LatestOrderProductIds":[100,101],
    "LatestOrderCategoryIds":[1,2],
    "LatestShippedOrderId":1000,
    "LatestShippedOrderDate":"2013-12-14T16:52:08.3112622Z",
    "TotalOrdered":100.99,
    "TotalOrderedLastMonth":100.99,
    "AllOrderedProductIds":[100,101]}
    },
    {
    "Email":"mary@poppins.com",
    "Name":"Mary Poppins",
    "Fields":{
    "FirstName":"Mary",
    "LastName":"Poppins",
    "Company":"Freelance",
    "LatestOrderId":1000,
    "LatestOrderDate":"2014-04-31T16:10:00.3112622Z",
    }
    }]

    JSON response (example)

    3

     

    Paging and filtering (example)

    none

     

    Read Import Status

    Description

    Read status of an import task by specifying its ID. List ID is not required.

    HTTP Method

    GET

    URL

    Code Block
    https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Import/{IMPORT_ID}

    JSON request (example)

    none

     

    JSON response (example)

    Code Block
    languagehtml/xml
    {"Completed":true,"CreatedRecipients":1,"ImportedRecipients":0,"NotValidRecipients":0,"UpdatedRecipients":0,"ValidRecipients":1,"idImport":3}

    Paging and filtering (example)

    none

     

     

    Manage a single email recipient / subscriber

    Info

    Definitions:

    • Email Recipient = with reference to a MailUp console account, it's an end user whose email address and optionally personal data fields is added to MailUp. A recipient may be subscribed, not subscribed, unsubscribed or pending on MailUp lists
    • Email Subscriber = with reference to a specific MailUp list, it's a recipient that is currently subscribed to that list

    Create a recipient / subscriber

    A single recipient can be added to a console account by calling Import Recipients and passing its details (at least one between email and mobile number and, optionally, personal data fields) as parameter.

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

     

    You cannot create a new recipient without subscribing it

    Expand
    titleClick here for more details...
    Use caseActionDescription
    Brand new recipientadded and subscribednot existing in any list of that account
    Recipient is already subscribed on that listpersonal data fields are updatedemail address and mobile number are primary keys
    Recipient is already subscribed/unsubscribed on another listsubscribed to specified list, personal data fields are updated 
    Key mismatchrequest is deniedRecipient was already present with both email address and mobile number, import operation provides the same email and a different mobile number (or viceversa)

    Update personal data fields of a subscriber

    This section refers to changes on personal data fields of specified recipient (that must already exist)

    Update operation requires

    • Recipient ID, which can be retrieved with the operation listed above (Check if a subscriber exists)
    • The IDs of the fields to be updated

    Description

    Retrieve recipient dynamic field definitions.

    HTTP Method

    PUT

    URL

    Code Block
    https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Recipient/DynamicFields

    JSON request (example)

    Expand

    Modifying the "Region" field for recipient with ID = 23

    Code Block
    [{
    	"Email":"test25@example.com",
    	"Fields":[{
    		"Description":"Region",
    		"Id":8,
    		"Value":"England"
    	}],
    	"Name":"Test",
    	"idRecipient":23
    }]

    JSON response (example)

    Expand
    Code Block
    {"IsPaginated":false,"Items":[{"Email":"test25@example.com","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":"Italy"},{"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":""}],"MobileNumber":null,"MobilePrefix":null,"Name":null,"idRecipient":23}],"PageNumber":0,"PageSize":20,"Skipped":0,"TotalElementsCount":1}

    Paging and filtering (example)

    none

     

    Update subscription status of a recipient

    You can use API to force subscription or unsubscription status of an existing recipient on a specified list. Unsubscription though REST API can be performed only in this way, since bulk unsubscription is not available yet.

    Update operation requires

    • Recipient ID, refer to section "Check if a subscriber exists"
    • List ID
    Note

     POST operation described in this section enables you to force subscription of unsubscribed recipients regardless the unsubscription reason. It is recommendend that you use this feature only if you're aware of its effects.

    Description

    Add/remove the recipient with the related id to the specified group

    HTTP Method

    POST/DELETE

    URL

    Subscribe

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

     

    Unsubscribe

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

    JSON request (example)

    none

    JSON response (example)

    none

    Paging and filtering (example)

    none

     

    Update group membership of a subscriber

    You can use API to add or remove an existing recipient from a specified group. 

    Update operation requires

    • Recipient ID, refer to section "Check if a subscriber exists"
    • The Group ID

    Description

    Add/remove the recipient with the related id to the specified group

    HTTP Method

    POST/DELETE

    URL

    Add

    Code Block
    POST https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Group/{id_Group}/Subscribe/{id_Recipient}

     

    Remove

    Code Block
    DELETE https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/Group/{id_Group}/Subscribe/{id_Recipient}

    JSON request (example)

    none

    JSON response (example)

    none

    Paging and filtering (example)

    none

    Check if a subscriber exists

    With this method you can also retreive recipientID and personal data fields of the recipient with the specified email

    Note
    titleKnown restriction

    If you are using this method to retrieve recipient ID, unfotunately there is not a method that allows you to search recipient "by email address regardless the subscription status". Hence, it is possible that you have to make up to three search: in subscribed, in unsubscribed and finally in pending recipients of that list,

    Expand

    when the specified recipient belongs to list suscribers the response contains the personal data fields of the recipient

    Code Block
    languagehtml/xml
    {"IsPaginated":false,"Items":[{"Email":"peter@example.com","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":""}],"MobileNumber":null,"MobilePrefix":null,"Name":null,"idRecipient":13}],"PageNumber":0,"PageSize":20,"Skipped":0,"TotalElementsCount":1}

    when the specified recipient does not belong to list subscribers (i.e. it may be not existing but also unsubscribed or subscribed only to other MailUp lists for that console account) an empty list is returned

    Code Block
    {"IsPaginated":false,"Items":[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

    Description 

    HTTP Method

    GET

    URL

     

    JSON request (example)

    none

    JSON response (example)

     

    Paging and filtering (example)


    Manage email attachments

    Description 

    HTTP Method

    GET

    URL

     

    JSON request (example)

    none

    JSON response (example)

     

    Paging and filtering (example)


     

    ...

    Send Email Messages

    Send to all subscribers

    Description 

    HTTP Method

    POST

    URL

     

    JSON request (example)

    none

    JSON response (example)

     

    Paging and filtering (example)


    Send to a group

    Description 

    HTTP Method

    POST

    URL

     

    JSON request (example)

    none

    JSON response (example)

     

    Paging and filtering (example)


    Send to a recipient

    Description 

    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)

    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}],"PageNumber":0,"PageSize":20,"Skipped":0,"TotalElementsCount":03}

    Paging and filtering (example)

    https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc/Console/List/3/Recipients/Subscribed?filterby="Email.Contains(%27peter@example.com%27)"N/A