MaxMD Direct Message RESTful API v3.0
RESTful Service for sending and retrieving Direct messages, managing Direct mailbox . This page includes description about service actions and data types.
RESTful Service for sending and retrieving Direct messages, managing Direct mailbox . This page includes description about service actions and data types.
https://api.directmdemail.com/message-rest/api/message/Send
Content-Type: application/json
JSON Object: SendRequest
JSON Object: SendMessageResponseType
Send a Direct message. The message will be saved into INBOX.Sent folder as an unread message automatically.
https://api.directmdemail.com/message-rest/api/message/SendWithHeader
Content-Type: application/json
JSON Object: SendRequestWithHeader
JSON Object: SendMessageResponseType
Send a Direct message with customized headers. The message will be saved into INBOX.Sent folder as an unread message automatically.
https://api.directmdemail.com/message-rest/api/message/Forward/{folderName}
Content-Type: application/json
JSON Object: UidsRequestType
JSON Object: SendMessageResponseType
Forward messages by folder name and uids. If multiple messages (multiple uid) are selected, the messages will be forwarded as attachments. The message will be saved into INBOX.Sent folder as an unread message.
https://api.directmdemail.com/message-rest/api/message/GetMessageStatus/{smtpId}
JSON Object: Authentication
JSON Object: DirectMessageStatusReportResponseType
Get the message information.
Each recipient of the a Direct message has it's own record. It may return multiple MessageLog records if the Direct message has multiple recipients.
https://api.directmdemail.com/message-rest/api/message/GetMessageStatus/
Content-Type: application/json
JSON Object: SmtpIdsRequestType
JSON Object: DirectMessageStatusReportResponseType
Get information of multiple messages.
https://api.directmdemail.com/message-rest/api/message/GetMessageCount/{folderName}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetCountResponse
Get the number of messages in a folder
https://api.directmdemail.com/message-rest/api/message/GetUnreadMessageCount/{folderName}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetCountResponse
Get the number of unread messages in a folder
https://api.directmdemail.com/message-rest/api/message/GetDeletedMessageCount/{folderName}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetCountResponse
Get the number of deleted messages in a folder
https://api.directmdemail.com/message-rest/api/message/GetMessagesByUIDs/{folderName}
Content-Type: application/json
JSON Object: UidsRequestType
JSON Object: GetMessageResponse
Get messages from a specified folder by UIDs.
https://api.directmdemail.com/message-rest/api/message/GetUnreadMessages/{folderName}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetMessageResponse
Get all unread messages from a specified folder
https://api.directmdemail.com/message-rest/api/message/GetMessagesByReceivedDate/{folderName}/{beginTime}/{endTime}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetMessageResponse
Get messages filtered by the received date
beginTime is Unix Time stamp: milliseconds since the Unix Epoch (1970-01-01T00:00:00Z ISO-8601) endTime is Unix Time stamp: milliseconds since the Unix Epoch (1970-01-01T00:00:00Z ISO-8601)
https://api.directmdemail.com/message-rest/api/message/GetMessagesByReceivedDateUTC/{folderName}/{beginTime}/{endTime}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetMessageResponse
Get messages filtered by the received date
beginTime and endTime in UTC. Format: yyyyMMddHHmmss, ex: 20160705174715 == Jul 05,2016 17:47:15 UTC or 13:47:15 EDT.
https://api.directmdemail.com/message-rest/api/message/GetMessagesBySender/{folderName}/{sender}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetMessageResponse
Get messages filtered by sender
https://api.directmdemail.com/message-rest/api/message/GetMessagesBySubject/{folderName}/{subject}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetMessageResponse
Get messages filtered by subject
https://api.directmdemail.com/message-rest/api/message/GetMessages/{folderName}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetMessageResponse
Get all messages from specific folder
https://api.directmdemail.com/message-rest/api/message/GetMessageMetaData/{folderName}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetMessageResponse
Get all metadata in the folder
https://api.directmdemail.com/message-rest/api/message/SearchMessagesMetadataByReceivedDate/{folderName}/{beginTime}/{endTime}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetMessageResponse
Get all metadata in the folder that filtered by the received date
beginTime is Unix Time stamp: milliseconds since the Unix Epoch (1970-01-01T00:00:00Z ISO-8601) endTime is Unix Time stamp: milliseconds since the Unix Epoch (1970-01-01T00:00:00Z ISO-8601)
https://api.directmdemail.com/message-rest/api/message/SearchMessagesMetadataByReceivedDateUTC/{folderName}/{beginTime}/{endTime}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetMessageResponse
Get all metadata in the folder that filtered by the received date
beginTime and endTime in UTC. Format: yyyyMMddHHmmss, ex: 20160705174715 == Jul 05,2016 17:47:15 UTC or 13:47:15 EDT.
https://api.directmdemail.com/message-rest/api/message/GetUIDs/{folderName}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetUIDResponseType
Get all UIDs in a specified folder. This function is useful to synchronize the folder's messages with server
https://api.directmdemail.com/message-rest/api/message/GetFolders/{rootFolderName}/{subscribedFolderOnly}
Content-Type: application/json
JSON Object: Authentication
JSON Object: GetFoldersResponseType
Get sub-folders of a spedified folder.
https://api.directmdemail.com/message-rest/api/message/SetFoldersSubscribed/
Content-Type: application/json
JSON Object: SetFoldersSubscribedRequestType
JSON Object: GetFoldersResponseType
Set a list of folders to subscribed/unsubscribed
https://api.directmdemail.com/message-rest/api/message/CreateFolder/{folderName}
Content-Type: application/json
JSON Object: Authentication
JSON Object: APIResponse
Create a new folder. All folder names should start with "INBOX.". And below reserved folders can not be re-created or deleted:
https://api.directmdemail.com/message-rest/api/message/MoveFolder/{folderName}/{newFolderName}
Content-Type: application/json
JSON Object: Authentication
JSON Object: APIResponse
Rename a un-reserved folder
https://api.directmdemail.com/message-rest/api/message/DeleteFolder/{folderName}
Content-Type: application/json
JSON Object: Authentication
JSON Object: APIResponse
Recursively delete a un-reserved folder. All inside messages and sub-folders will be deleted also.
https://api.directmdemail.com/message-rest/api/message/CopyMessagesByUIDs/{folderName}/{destFolderName}
Content-Type: application/json
JSON Object: UidsRequestType
JSON Object: APIResponse
Copy messages by UIDs
https://api.directmdemail.com/message-rest/api/message/MoveMessagesByUIDs/{folderName}/{destFolderName}
Content-Type: application/json
JSON Object: UidsRequestType
JSON Object: APIResponse
Move messages by UIDs
https://api.directmdemail.com/message-rest/api/message/DeleteMessagesByUIDs/{folderName}/{deleteForever}
Content-Type: application/json
JSON Object: UidsRequestType
JSON Object: APIResponse
Delete messages by UIDs. If deleteForever is false, the messages will be moved to INBOX.Trash folder
https://api.directmdemail.com/message-rest/api/message/MarkMessagesAsReadByUIDs/{folderName}
Content-Type: application/json
JSON Object: UidsRequestType
JSON Object: APIResponse
Mark messages as READ by UIDs
https://api.directmdemail.com/message-rest/api/message/MarkMessagesAsUnreadByUIDs/{folderName}
Content-Type: application/json
JSON Object: APIResponse
Mark messages as UNREAD by UIDs
https://api.directmdemail.com/message-rest/api/message/GetRawMessagesByUIDs/{folderName}
Content-Type: application/json
JSON Object: GetRawMessageResponse
Get messages raw data by a list of Unique ID. The Unique ID is the received order of a message. It is unchangeable and unique in a folder. It is recommended to use UniqueID to identity each message.
https://api.directmdemail.com/message-rest/api/message/SaveRawMessages/{folderName}
Content-Type: application/json
JSON Object: RawMessagesRequestType
JSON Object: APIResponse
Get messages raw data by a list of Unique ID. The Unique ID is the received order of a message. It is unchangeable and unique in a folder. It is recommended to use UniqueID to identity each message.
Parameter | Description | |
---|---|---|
Authentication authentication | Authentication information | Required |
Message message | Message data | Required |
Parameter | Description | |
---|---|---|
Authentication authentication | Authentication information | Required |
MessageWithHeader message | Message data with customized headers | Required |
Parameter | Description | |
---|---|---|
String username | Direct email address | Required |
String password | User password | Required |
Parameter | Description | |
---|---|---|
Authentication auth | Authentication information | Required |
long[] uids | Array of UIDs | Required |
RecipientCollection recipients | Collection of all recipients | Optional |
Parameter | Description | |
---|---|---|
Authentication auth | Authentication information | Required |
String[] smtpIds | Array of SMTP IDs | Required |
Parameter | Description | |
---|---|---|
Authentication auth | Authentication information | Required |
String[] folders | Array of folder name | Required |
boolean subscribed | True: set folder subscribed False: set folder unsubscribed |
Required |
Parameter | Description | |
---|---|---|
Authentication auth | Authentication information | Required |
RawMessage[] messages | Array of raw message | Required |
Parameter | Description | |
---|---|---|
String sender | From email address (same as username) | Required |
String subject | Email subject | |
String body | Email body | |
boolean htmlBody | true: html body, false: plain text body | Required |
Recipient[] recipients | An array of recipient objects | Required |
Attachment[] attachmentList | An array of attachment objects |
Parameter | Description | |
---|---|---|
String sender | From email address (same as username) | Required |
String subject | Email subject | |
String body | Email body | |
boolean htmlBody | true: html body, false: plain text body | Required |
Recipient[] recipients | An array of recipient objects | Required |
Attachment[] attachmentList | An array of attachment objects | |
MessageHeader[] headers | An array of message headers |
Parameter | Description | |
---|---|---|
String email | Recipient's email address | Required |
RecipientType type | Recipient type (TO|CC|BCC) | Required |
Parameter | Description | |
---|---|---|
String resourceType | Resource Type Read the Spec | Required |
FHIRQueryParameterType[ ] queryParameters | Query parameters |
Parameter | Description | |
---|---|---|
String name | Parameter name | Required |
String name | Parameter value | Required |
Parameter | Description | |
---|---|---|
String content | Base64 encoded data of the attachment | Required |
String contentType | Content-Type of the attachment | Required |
String filename | Attachment file name | Required |
Parameter | Description | |
---|---|---|
boolean success | whether action is successful | |
int code | Error code (1: authentication failed, 2: address error, 3 and 4: other error | |
String message | Information of the SOAP request |
Parameter | Description | |
---|---|---|
String smtpId | The Message-ID of the Direct message you just sent or forwarded. You will use this id to check the message status. |
Parameter | Description | |
---|---|---|
boolean hasCvData |
true: csvData is responsed, messageLogs is empty false: messageLogs is responsed, csvData is empty |
|
byte[] csvData | csv formatted message status report data with below columns:
This variable is empty if hasCvData==false or no message was found in the certain date range. |
|
DirectMessageLog[] messageLogs | And list of message log object. This variable is empty if hasCvData==true or no message was found in the certain date range. |
Parameter | Description | |
---|---|---|
String from | Sender direct address of the message | |
String to | Recipient direct address of the message | |
String messageId | SMTP Message ID of the message | |
long messageSize | size of the message | |
String status | Status of the message:
|
|
String statusDetails | Details of delivery status | |
Date ts | Sent time | |
String xdrId | XDR Message ID | |
String uniqueId | XDR Unique ID | |
String sourceId | XDR Source ID | |
String patientId | XDR Patient ID |
Parameter | Description | |
---|---|---|
String[] folders | The folders |
Parameter | Description | |
---|---|---|
int count | The count number |
Parameter | Description |
---|---|
MessageDetail[] messages | An array of searched messages |
Parameter | Description |
---|---|
longuid | New parameter. The received order in a folder. Is uid is unique and will not be changed in a folder. |
int msgnum | The message number for this message |
String msgID | Message ID of this message. This method returns null if the corresponding header is not present. |
String folder | Get the folder from which this message was obtained. If this is a new message or nested message, this method returns null. |
boolean expunged | Whether the message is expunged |
String sender | From email address (same as username) (Inherited from APIResponse ) |
int size | The size of the content of this message in bytes. Return -1 if the size cannot be determined. |
Date sentDate | The Date the message was sent |
Date receivedDate | The Date the message was received |
String replyTo | Get the addresses to which replies should be directed. This will usually be the sender of the message, but some messages may direct replies to a different address. This method returns null if the corresponding header is not present. |
MessageHeader[] headers | An array of message header objects |
String subject | Email subject (Inherited from APIResponse ) |
String body | Email body (Inherited from APIResponse ) |
boolean htmlBody | true: html body, false: plain text body (Inherited from APIResponse ) |
Recipient[] recipients | An array of recipient objects (Inherited from APIResponse ) |
Attachment[] attachments | An array of attachment objects (Inherited from APIResponse ) |
Parameter | Description |
---|---|
String name | Name of this header line |
String value | Value of this header line |
Parameter | Description |
---|---|
long[] uids | List of UIDs |
Parameter | Description |
---|---|
RawMessage[] messages | An array of searched messages |
Parameter | Description |
---|---|
longuid | New parameter. The received order in a folder. Is uid is unique and will not be changed in a folder. |
String msgID | Message ID of this message. This method returns null if the corresponding header is not present. |
String folder | Get the folder from which this message was obtained. If this is a new message or nested message, this method returns null. |
String data | Base64 encoded message raw data. |