This page provides you information about how to use MailUp REST API to create email messages and to send them to specified recipients.
...
Description | Retrieve email messages of specified list | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HTTP Method | GET | ||||||||||||
URL | Retrieve all email messages of that list
Retrieve only email messages that have been published (i.e. with public visibility, see details)
Retrieve only email messages that have been archived (i.e. with public visibility, see details)
*an empty list is returned if public visibility of messages (aka Web library) is disabled. You shall enable it to Retrieve them | ||||||||||||
JSON request (example) | none | ||||||||||||
JSON response (example) | All email messages of specified list
List published messages (public URLs are also provided)
List archived messages
| ||||||||||||
Paging and filtering (example) | 2 items per page, get first page (count starts from zero)
Retrieve messages that contain the word "test" in the subject field and order by ID. Note: search by text is case sensitive
Retrieve only the messages with tags whose IDs are 1, 13 or 45 (at least one of them).
|
Read message details
Description | Retrieve the email details (content, settings, attachment) by specified id | ||||||||
---|---|---|---|---|---|---|---|---|---|
HTTP Method | GET | ||||||||
URL | Retrieve the email details by specified id
Get attachment list for the specified message id
| ||||||||
JSON request (example) | none | ||||||||
JSON response (example) | Message content
Message attachments
| ||||||||
Paging and filtering (example) | 2 items per page, get first page (count starts from zero)
Retrieve messages that contain the word "test" in the subject field and order by ID. Note: search by text is case sensitive
|
...
Description | Read, add and remove message attachments | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HTTP Method | GET, POST, DELETE | ||||||||||||
URL | Retrieve all the attachments of a specified message
Add an attachment to message slot
Remove an attachment from a message slot
| ||||||||||||
JSON request (example) | Only POST method needs a request parameter. Attachment has to be Base64 encoded
| ||||||||||||
JSON response (example) | GET method returns a list of the documents that are attached to specified message. An empty array ([], not JSON format) is returned if no document is attached.
POST method returns the list of attachments after the command execution
DELETE method returns details about remaining attachments after deletion
| ||||||||||||
Paging and filtering (example) | none |
...
Send Email Messages
This section contains methods to send messages and to retrieve the history of sent messages.
You can enrich the calls to send messages using some querystring parameters, as follow:
Querystring parameter | Description | Example |
---|---|---|
SenderName SenderAddress | Email messages are usually sent with the sender name and the sender name that are specified as default settings for the MailUp list. As an alternative you can specify a different sender for a certain sending by specifying "SenderName" and "SenderAddress" |
...
parameters. You have to provide both parameters, and not only one of them |
...
. |
...
POST .../Send?SenderName='John |
...
Smith'&SenderAddress='smith@example.com' |
...
datetime | It is possible to specify an eventual UTC date/time for a deferred sending |
...
. The format described in the section 'Type and cast definition' of this page: "Paging and filtering". |
...
POST .../Send?datetime="2014-10-20 05:00:00Z" |
...
replyto | It is possible to specify an email address for reply. | POST .../Send?replyto="replyto@yourdomain.it |
Note |
---|
Message sending fails with HTTP 500 error if no authorized sender email nor sender email are provided. Ensure that sender name and sender email have been configured at list level (starting from MailUp version 8.6.1 the sender address has also to be a verified address) |
...