postal icon indicating copy to clipboard operation
postal copied to clipboard

Name and format of Opened event

Open kirk-quinbar opened this issue 7 years ago • 3 comments

Unless i am missing something in the documentation, there doesnt seem to be an example and format of the opened event that can be sent to the webhook in postal. I wanted to know the name and json layout.

this is the documentation where i expected it to be: https://github.com/atech/postal/wiki/Webhook-Events-&-Payloads

kirk-quinbar avatar Aug 07 '18 20:08 kirk-quinbar

Good spot!

The name you will receive is MessageLoaded and the JSON should be identical to theMessageLinkClicked payload but without the url and token so something like this:

{
  "ip_address":"185.22.208.2",
  "user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36",
  "message":{
    "id":12345,
    "token":"abcdef123",
    "direction":"outgoing",
    "message_id":"[email protected]",
    "to":"[email protected]",
    "from":"[email protected]",
    "subject":"Welcome to AwesomeApp",
    "timestamp":1477945177.12994,
    "spam_status":"NotSpam",
    "tag":"welcome"
  }
}

willpower232 avatar Aug 08 '18 09:08 willpower232

thanks for the quick answer! it would be good to add that to that webhooks overview page.

kirk-quinbar avatar Aug 08 '18 13:08 kirk-quinbar

One for @adamcooke

willpower232 avatar Aug 08 '18 13:08 willpower232