This API version isn't the latest one.
It is advisable to use the latest API version which contains the latest Context.IO enhancements.
Returns document and contact information about a given email message. A message can be identified by the value of its Message-ID header or by the combination of the date sent timestamp and email address of the sender.
GET https://api.context.io/1.1/messageinfo.json?emailmessageid=value_of_Message-ID_header
OR
GET https://api.context.io/1.1/messageinfo.json?datesent=timestamp&from=email_address
The emailmessageid parameter alone is sufficient. If the Message-ID header isn't available (such as in Gmail Contextual Gadgets) or can't be relied upon (such as in emails sent through Exchange) than datesent and from must be set.
Note that both datesent and from are ignored if emailmessageid is set.
The value of the Message-ID header. As specified in the RFC822, the < and > at the beginning and end of the Message-ID are part of the value and should be included in this parameter.
The value of the Date header of the message in UNIX timestamp format.
The email address portion in the From header of the message. The From header value usually includes the sender's display name along with the email address, the parameter expects only the email address, do not include the display name portion.
The email address of the account you want to get data from. This parameter must be set if your API key has access to more than one email account (see imap/addaccount).
{
...
data: {
addresses: [...],
emailMessageId: string,
date: (integer) Sent time of the message (unix timestamp),
subject: (string) Subject of the message ,
gmailMessageId: (string) Only applicable for Gmail/Google Apps mailboxes,
gmailThreadId: (string) Unique ID of the thread the message is part of [only for Gmail/Google Apps mailboxes],
files: [...],
personInfo: [...]
}
}
Indicates information about the sender and recipient(s) of the message. See message addresses information for more information.
The value of the Message-ID header of the message for which data was requested.
List of files attached to the message. The properties included for each file are as follows:
files: [
{
bodySection: (integer) Indicates the MIME section where that file is found,
disposition: (string) Value of disposition attribute for that MIME body section, usually 'attachment',
emailMessageId: (string) The Message-ID header value of the message the file is attached to,
fileId: (string) Unique Context.IO ID for the file,
fileName: (string) Complete file name including extension,
gmailMessageId: (string) Unique ID of the message [only for Gmail/Google Apps mailboxes],
gmailThreadId: (string) Unique ID of the thread the message is part of [only for Gmail/Google Apps mailboxes],
size: (integer) Size of the file in bytes,
supportsPreview: (boolean) Whether a preview of that file can be shown,
type: (string) MIME type of the file as indicated in message body part
}
]
Indicates information about the sender and recipient(s) of the message. See message person information for more information.
Given the following email headers:
Delivered-To: jim.bob@dokdok.com
Received: by 10.134.203.56 with SMTP id f5csd2123awo;
Wed, 22 Sep 2010 11:30:52 -0700 (PDT)
Return-Path: <dave@acme.com>
Received: from relay.superemail.com (relay.superemail.com [46.66.72.69])
by mx.google.com with ESMTP id f5as114792315bwo.129.2010.09.22.11.30.51;
Wed, 22 Sep 2010 11:30:51 -0700 (PDT)
From: Dave Stewart <dave@acme.com>
To: Jim Bob <jim.bob@dokdok.com>
Cc: James Brown <james@brown.com>
Date: Wed, 22 Sep 2010 14:30:40 -0400
Subject: Context.IO's API really rocks!
Message-ID: <B9163A9EFBD984479B2D6FACF875A0C@mail.superemail.com>
In-Reply-To: <216C1-D1048E-1423-CF8AB23DB780@dokdok.com>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
The correct call would be:
GET https://api.context.io/1.1/messageinfo.json?emailmessageid=%3CB9163A9EFBD984479B2D6FACF875A0C%40mail.superemail.com%3E
Had the Message-ID header been absent or unaccessible for some reason, the correct call would be:
GET https://api.context.io/1.1/messageinfo.json?from=dave%40acme.com&datesent=1285180240