API Reference‎ > ‎Alert‎ > ‎

Create

REST API Method:Create

Create  alerts handlers

 

URL:

https://api.mailmonitorapp.com/mma/alert/handlers


HTTP Method(s):

POST


Operation values: [">","<",">=","<=","="]
deliveryType values:
["INBOX","SPAM","MISSING"]


    Example JSON Data Element:


{

   "event":"DELIVERY_RATE",

   "deliveryRateCriteria":{

      "deliveryType":"INBOX",

      "operation":"<",

      "rate":50

   },

   "endpoints":[

      {

         "email":"jomifanu34448@gmail.com"

      },

      {

         "webhook":"http://k4642lk.com"

      }

   ]

}


Response

JSON object with an array object of handlers. Each handler object has a defined alert setup with event type and alert type(email, webhook, SMS):

  • email: endpoint email will receive the alert
  • eventType: eventType configured for handler
  • handlerId: internal handler id
  • deliveryType: percentage of messages that were delivered to specified delivery type
  • operation: operation used to compute deliverytype value
  • rate: rate used to compute alert. 

          JSON example response :

{

   "handlers":[

      {

         "deliveryRateCriteria":{

            "deliveryType":"INBOX",

            "handlerId":0,

            "id":0,

            "operation":"<",

            "rate":50.0

         },

         "email":"jjj@gmail.com",

         "eventType":"DELIVERY_RATE",

         "handlerId":72

      }

   ]

}


Error Codes:


400 - If the event type is invalid.



Comments