Message Event Webhook Format

Below is a list of the keys included for message events.

Keydescription
ts the integer utc unix timestamp when the event occurred
event the name of the event, one of: send, deferral, hard_bounce, soft_bounce, open, click, spam, unsub, reject
url for click events only, the url clicked for the event
ip for open and click events only, the ip address where the event originated
user_agent for open and click events only, the user agent string for the environment (ie, browser or email client) where the open or click occurred
location for open and click events only, the location where the event occurred. value will be null if no location can be determined from the ip address of the event. otherwise, an array of key/value pairs with the following keys:
country_short string abbreviated country
country_long string the full country name
region string  
city string  
postal_code string  
timezone string  
latitude floating point number can be negative
longitude floating point number can be negative
user_agent_parsed for open and click events only, a parsed version of the user agent detected for the event. value will be null if user agent can't be determined. otherwise, an array of key/value pairs with the following keys:
mobile boolean whether the user agent is a mobile agent
os_company string the operating system company
os_company_url string url of the operating system company
os_family string the operating system family, ie, linux, mac, windows
os_icon string url for an icon for the operating system
os_name string the name of the operating system used for the event
os_url string url for the operating system
type string the type of user agent (ie, "browser", "email client", "robot", etc. - these may be updated, so string values may be added)
ua_company string company for the user agent (specifically the browser or email client)
ua_company_url string url for the user agent company
ua_family string family for the user agent (ie, Firefox, Chrome, Safari)
ua_icon string url for an icon for the user agent
ua_name string name of the user agent
ua_url string url for the user agent
ua_version string version of the user agent
_id the unqiue identifier of the message that generated the event. This is not an event identifier, but rather a reference to the message id for the email that was sent, opened, clicked, etc.
msg details about the message for which the event occurred. May be empty if the message that generated an open or click is older than 30 days, or when the message was not yet indexed when the event (open, click) occurred.
_id the unique identifier assigned to each email sent via Mandrill
ts the integer UTC unix timstamp that the message was sent
email the recipient's email address
sender the sender's email address
subject the subject line of the message
smtp_events an array of JSON objects, each of which is an SMTP response received for the message. Each item in the array will contain the following keys:
ts the timestamp of the SMTP event
type the type of SMTP event, such as 'sent' or 'deferred'
diag the SMTP diagnostic or response message returned by the receiving server
source_ip the Mandrill IP address that was attempting to send the message
destination_ip the remote IP address of the server Mandrill was connected to for message relay
size the size of the message being relayed
opens an array containing an item for each time the message was opened. Each open includes the following keys:
ts the timestamp for the open
ip the IP address where the open occurred
location the approximated geolocation of the IP where the open occurred
ua a string representation of the operating system and browser (or user agent) for the open
clicks an array containing an item for each click recorded for the message. Each item contains the following:
ts timestamp of the click
url the URL that was clicked
tags an array of the tag names that were applied to the message, if any
metadata an array of the metadata key:value pairs that were applied to the message, if any
state the state of the message (sent, rejected, spam, unsub, bounced, or soft-bounced)
subaccount the subaccount from which the message originated, if no subaccount was used, the value will be null
diag for bounced and soft-bounced messages, provides the specific SMTP response code and bounce description, if any, received from the remote server
bounce_description for bounced and soft-bounced messages, a short description of the bounce reason such as bad_mailbox or invalid_domain
template the slug of the template used, if any. If no template was used, the value will be null