Search recently sent messages and optionally narrow by date range, tags, senders, and API keys. If no date range is specified, results within the last 7 days are returned. This method may be called up to 20 times per minute. If you need the data more often, you can use <a href="/api/docs/messages.html#method=info">/messages/info.json</a> to get the information for a single message, or <a href="http://help.mandrill.com/entries/21738186-Introduction-to-Webhooks">webhooks</a> to push activity to your own application for querying.
<a href="http://help.mandrill.com/entries/22211902">search terms</a> to find matching messages
$date_from
—
string
start date
$date_to
—
string
end date
$tags
—
array
an array of tag names to narrow the search to, will return messages that contain ANY of the tags
$senders
—
array
an array of sender addresses to narrow the search to, will return messages sent by ANY of the senders
$api_keys
—
array
an array of API keys to narrow the search to, will return messages sent by ANY of the keys
$limit
—
integer
the maximum number of results to return, defaults to 100, 1000 is the maximum
Returns
array
of structs for each matching message - return[] struct the information for a single matching message
- ts integer the Unix timestamp from when this message was sent
- _id string the message's unique id
- sender string the email address of the sender
- template string the unique name of the template used, if any
- subject string the message's subject line
- email string the recipient email address
- tags array list of tags on this message
- tags[] string individual tag on this message
- opens integer how many times has this message been opened
- opens_detail array list of individual opens for the message
- opens_detail[] struct information on an individual open
- ts integer the unix timestamp from when the message was opened
- ip string the IP address that generated the open
- location string the approximate region and country that the opening IP is located
- ua string the email client or browser data of the open
- clicks integer how many times has a link been clicked in this message
- clicks_detail array list of individual clicks for the message
- clicks_detail[] struct information on an individual click
- ts integer the unix timestamp from when the message was clicked
- url string the URL that was clicked on
- ip string the IP address that generated the click
- location string the approximate region and country that the clicking IP is located
- ua string the email client or browser data of the click
- state string sending status of this message: sent, bounced, rejected
- metadata struct any custom metadata provided when the message was sent
- smtp_events array a log of up to 3 smtp events for the message
- smtp_events[] struct information about a specific smtp event
- ts integer the Unix timestamp when the event occured
- type string the message's state as a result of this event
- diag string the SMTP response from the recipient's server