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"]

minCollectionTime : optional (default value is PT15M)

minCollectionPercent: optional(value from 0-100)

eventType: ["DELIVERY_RATE,DNSBL.Hit"]

email: email you want to receive the alert

sms: phone number you want to receive the alert

rate: numeric value from 0-100

deliveryRateCriteria: should only be provide for eventType DELIVERY_RATE

Example JSON Data Element:

{

"deliveryRateCriteria": {

"deliveryType": "INBOX",

"minCollectionPercent": 0,

"minCollectionTime": "PT15M",

"operation": "<",

"rate": 44

},

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

"eventType": "DELIVERY_RATE",

"handlerId": 18

}

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.