Table of Contents:


The Ongage Webhook

Intro

Note: If you'd like to Push Opens and Clicks to your CRM/Back-end, please see the Webhook Example under our Automation Rules feature.

The post command to your endpoint 

Ongage will issue an HTTP Post call to the endpoint URL you provide with an accompanying JSON as in the following format example:

[  
   {  
      "email":"email1@email.com",
      "list_id":9997,
      "status":"unsubscribe",
      "esp_name" : "Amazon SES"
   },
   {  
      "email":"email2@email.com",
      "list_id":9998,
      "status":"soft",
      "esp_name" : "Amazon SES"
   },
   {  
      "email":"email3@email.com",
      "list_id":9998,
      "status":"hard"
      "esp_name" : "Amazon SES"
   },
   {  
      "email":"email41@email.com",
      "list_id":9994,
      "status":"complaint"
      "esp_name" : "Amazon SES"
   }
]

How to read the data from your endpoint 

To read the data on your end you'll need something like the following PHP code example

$someArray = json_decode(file_get_contents("php://input"), true);

Here are 2 PHP code examples if you'd like to simulate this on your end:

  1. request.php
  2. response.php

Available status values

The status parameter above can contain any of the following values:

  1. soft
  2. hard
  3. unsubscribe
  4. complaint

Additional technical details