Get Message Detail

Description

This endpoint can be used to get deatils around a message identified with the Message Finder Search endpoint. A key capabilitiy is the ability to get an ID of an attachment for download.

Pre-requisites

  • In order to successfully use this endpoint the logged in user must be a Mimecast administrator with at least the Gateway | Tracking | Read permission.

URI

To use this endpoint you send a POST request to:

  • /api/gateway/message/get-message-detail

Request Headers

The following request headers must be included in your request:

Field Description
Authorization Please see the Authorization guide for more information on building the Authorization header.
x-mc-req-id

A randomly generated GUID, for example,

8578FCFC-A305-4D9A-99CB-F4D5ECEFE297
x-mc-app-id The Application ID provided with your Registered API Application.
x-mc-date

The current date and time in the following format, for example,

Tue, 24 Nov 2015 12:50:11 UTC

Request Body

{
 "data": [
  {
   "viewType": "String", 
   "id": "String", 
   "context": "String", 
   "mailbox": "String"
  }
 ]
}
data
Field Type Required Description
mailbox String Optional The address of a specific mailbox from which the message should be received.
context String Optional The version of the message to be returned. Must be one of DELIVERED or RECEIVED. Default value is DELIVERED
viewType String Optional The context of the message to view. Must be one of archive or mailbox_recovery. Default value is archive.
id String Required The Mimecast secure ID of the mesasge to be returned. This ID can be obtained using the Get Hold Message List endpoint.

Response

{
 "fail": [], 
 "meta": {
  "status": 200
 }, 
 "data": [
  {
   "status": "String", 
   "smash": "String", 
   "mimeMessageId": "String", 
   "hasHtmlBody": true, 
   "attachments": [
    {
     "verdict": "String", 
     "scanDate": "Date String", 
     "sha256": "String", 
     "contentType": "String", 
     "extension": "String", 
     "contentId": "String", 
     "size": 173, 
     "bodyType": 5, 
     "id": "String", 
     "filename": "String"
    }
   ], 
   "received": "String", 
   "cc": [
    {
     "displayableName": "String", 
     "emailAddress": "String"
    }
   ], 
   "isPassthrough": false, 
   "envelopeFrom": {
    "displayableName": "String", 
    "emailAddress": "String"
   }, 
   "headers": [
    {
     "values": [
      "String"
     ], 
     "name": "String"
    }
   ], 
   "to": [
    {
     "displayableName": "String", 
     "emailAddress": "String"
    }
   ], 
   "processed": "String", 
   "hasTextBody": true, 
   "headerDate": "String", 
   "from": {
    "displayableName": "String", 
    "emailAddress": "String"
   }, 
   "messageBodyPreview": "String", 
   "size": 5248, 
   "id": "String", 
   "isCcm": false, 
   "subject": "String"
  }
 ]
}
meta object
Field Type Description
status Number The function level status of the request.
meta
Field Type Description
status Number The function level status of the request.
data
Field Type Description
id String The Mimecast secure id of message.
mimeMessageId String The Message-ID header value.
smash String The SMASH ID value of the message.
subject String The message subject.
size Number The message size in KB.
received Date String Timestamp of the date that Mimecast received the message in ISO 8601 format.
processed Date String Timestamp of the date that Mimecast processed the message in ISO 8601 format.
status String Current archive state of the message. Possible values are ACTIVE or ARCHIVED.
hasHtmlBody Boolean Indicates if the message included an HTML version of the body.
hasTextBody Boolean Indicates if the message included a plain text version of the body.
isPassthrough Boolean Indicates if a Message Passthrough policy was applied to the message, preventing any modifications.
envelopeFrom Email Address Object An object contianing information about the envelope from address.
from Email Address Object An object containing information about the header from address.
to Array of Email Address Objects A list of objects containing information about the message recipients.
cc Array of Email Address Objects A list of objects containing information about the carbon-copied recipients.
headerDate String Value of the message's Date header.
headers Array of Message Header Objects An array containing information about each message header.
attachments Array of Attachment Objects An Array containing information about each message attachment.
messageBodyPreview String A brieft snipplet from the beginning on the message body content.
subjecisCcmt Boolean Indicated if the message was sent as a Mimecast Secure Message.
Email Address Oject
Field Type Description
emailAddress String Email address used to transmit the message, without display name.
displayableName String Display name prefixed to the email address. Will not be included if the address does not contain a display name.
Message Header Object
Field Type Description
name String Name of the header.
values Array of Strings An array containing strings for each header value matching the header name.
Attachment Object
Field Type Description
id String The Mimecast secure ID of the attachment, used to download with Get File endpoint.
filename String Attachment name, without extension.
size Number Size of the message in KB.
extension String Attachment extension value.
contentType String The content-type of the attachment.
contentId String The content identifier of the attachment type.
sha256 String The SHA256 file hash value for the attachment.
md5 String The MD5 file hash value, if available.
bodyType Number Value identifying if the attachment is included in the body (inline attachment).
scanDate Date String Timestamp of the file scan by Attachment Protection, if applicable, in ISO 8601 format.
verdict String Scan result of the attachment, if processed by Attachment Protection. Possible values are SAFE or MALICIOUS.

Sample Code

Sample code is provided to demonstrate how to use the API and is not representative of a production application. To use the sample code; complete the required variables as described, populate the desired values in the request body, and execute in your favorite IDE.  Please see the Global Base URL's page to find the correct base URL to use for your account.

POST {base_url}/api/gateway/message/get-message-detail
Authorization: MC {accesskKey}:{Base64 encoded signed Data To Sign}
x-mc-date: {dateTime}
x-mc-req-id: {unique id}
x-mc-app-id: {applicationId}
Content-Type: application/json
Accept: application/json


{
  "data":[
    {
        "context": "String",
        "viewType": "String",
        "mailbox": "String",
        "id": "String"
    }
  ]
}