Webhooks to Follow up Activities

This functionality allows receiving information about all the activities of your contacts in real-time. The information is delivered as scheduled to the specified URL using POST requests as explained below.

For comparison/alternative, there is Reteno Public API. It is triggered when GET requests are sent from your side. Time intervals (3 months maximum) and parameters (email, status, and others) can be specified in the requests.

Using webhooks, you receive information about any user activities when:

  • delivered
  • delivery error
  • read
  • the recipient followed the link
  • the recipient unsubscribed
  • the recipient reported spam
    messages are sent in any messaging channel.

How to Configure Webhooks for Your Account

Configure URL on the server where you want to receive notifications and POST requests in JSON format.

Indicate that URL address in Reteno settings. To do that:

  1. Click the caret next to your account name.
  2. Choose Settings.
  3. Choose the Laboratory item in the menu on the left side.
1998
  1. Enable the Webhooks slide button.
  2. Click the caret of the Webhooks section.
  3. Type in/paste your URL address into the Webhook address field.
  4. Click the Save button.
1999

Upon saving, a GET request is sent by the system to the URL address for testing. If an error is returned, then probably your server has blocked our request. The actual cause can be determined from the server error code. If the test has passed successfully, then the setting-up is complete.

After that, perform any action in your account. For example, send yourself an email message. In several minutes, a POST request is sent to the specified address with the information about the latest actions.

POST requests are sent in JSON format in case of any actions by users (sent email, opened message, click-through, or other).

If the webhook URL does not return the HTTP 200 response code then the attempt of the POST request is repeated with incremented intervals (1 minute, 2 minutes, 4 minutes, 8 minutes, and up to 1 request per hour). The following requests are postponed until the successful delivery of the first one and then they are delivered in their sequence.

List of Possible Parameters

ParameterTypeDescription
broadcastIdintBroadcast ID
workflowIdintWorkflow ID
workflowBlockIdstringWorkflow block ID
sourceEventKeystringSource event key
sourceEventTypeKeystringSource event type key
iidstringService Parameter
contactIdintContact ID
emailstringContact Email
smsstringContact phone number
viberstringContact phone number
mobilepushstringMobile app subscriber token
webpushstringWeb push subscriber token
activityStatusstringActivity status:

DELIVERED – the message was delivered.
UNDELIVERED – the message was undelivered (statusDescription contains the reason).
READ – the message was read.
UNSUBSCRIBED – a contact unsubscribed from the broadcasting list.
CLICKED – a contact clicked links in the message.
SPAM – a contact reported spam.
SUBSCRIPTION_CHANGED – a contact changed the subscription category.
messageIdintMessage ID
messageInstanceIdintMessage instance ID
messageNamestringMessage name (empty for test emails)
messageTagstringMessage tag
activityDateTimestringActivity date and time
statusDescriptionstringThis field is returned only in the event when the status is UNDELIVERED. It contains the reason why the message has been undelivered. This may be a recipient server response, a system response saying that message delivery was not possible, and other similar reasons.
viewMessageLinkstringContains the link to the message web-version
clickEventLinkstringContains the link clicked by a contact (when the status is CLICKED)
hardBounceboolThis field is returned only in case when the status is UNDELIVERED. The parameter informs that the contact is in the black list.

false – not in the black list at the moment of message delivery.
true – in the black list at the moment of message delivery.
statusDataData array
subscriptionData array
subscriptionsarray of stringsSubscription category keys

The test example of a webhook as JSON array with all possible status options:

[{
        "iid": "ffd3e1a7-a270-4e58-94de-5ac681c5c8e7",
        "contactId": 687266822,
        "activityStatus": "SUBSCRIPTION_CHANGED",
        "mediaType": "email",
        "activityDateTime": "2019-09-26T14:45:18",
        "statusData": {
            "subscription": {
                "subscriptions": [
                    "SMARTPHONES",
                    "TABLETS",
                    "LAPTOPS"
                ]
            }
        }
    },
    {
        "broadcastId": 2833914,
        "messageName": "promo",
        "iid": "76662EBB-9FD4-4A6A-B1F8-2F594DF9B7B4",
        "contactId": 295953704,
        "email": "[email protected]",
        "activityStatus": "DELIVERED",
        "mediaType": "email",
        "messageId": 976440,
        "messageInstanceId": 1344540,
        "activityDateTime": "2018-03-01T13:31:52",
        "viewMessageLink": "https://123.esclick.me/test"
    },
    {
        "broadcastId": 2833915,
        "messageName": "promo",
        "hardBounce": false,
        "iid": "D5AF8EFC-2E8F-4BB5-B427-77D554B30E65",
        "contactId": 357885291,
        "sms": "380671234567",
        "activityStatus": "UNDELIVERED",
        "mediaType": "sms",
        "activityDateTime": "2019-10-01T03:43:49",
        "statusDescription": "IM_NO_MONEY"
    },
    {
        "broadcastId": 2833914,
        "messageName": "promo",
        "hardBounce": false,
        "iid": "76662EBB-9FD4-4A6A-B1F8-2F594DF9B7B4",
        "contactId": 295953704,
        "email": "[email protected]",
        "activityStatus": "UNDELIVERED",
        "mediaType": "email",
        "messageId": 976440,
        "messageInstanceId": 1344540,
        "activityDateTime": "2018-03-01T13:31:58",
        "statusDescription": "smtp;554 5.7.1 Spam message rejected; If this is not spam contact abuse",
        "viewMessageLink": "https://123.esclick.me/test"
    },
    {
        "workflowId": 245460,
        "workflowBlockId": "e_e9e90420db06b64c157440cd60d0b73d",
        "sourceEventKey": "1258810400",
        "sourceEventTypeKey": "subscribeFromApi",
        "iid": "0bb5e1dc-0d1b-4deb-948f-8cea4d8ef738",
        "contactId": 1258810400,
        "email": "[email protected]",
        "activityStatus": "READ",
        "mediaType": "email",
        "messageId": 1235215,
        "messageInstanceId": 1622691,
        "messageName": "promo",
        "messageTag": "1522397496",
        "activityDateTime": "2018-05-15T04:05:53",
        "viewMessageLink": "https://123.esclick.me/test"
    },
    {
        "workflowId": 245460,
        "workflowBlockId": "e_e9e90420db06b64c157440cd60d0b73d",
        "sourceEventKey": "1258810400",
        "sourceEventTypeKey": "subscribeFromApi",
        "iid": "92227CB7-4EEF-4168-9EA5-43F3ED3559F8",
        "contactId": 1258810400,
        "email": "[email protected]",
        "activityStatus": "UNSUBSCRIBED",
        "mediaType": "email",
        "messageId": 1166457,
        "messageInstanceId": 1550164,
        "messageName": "promo",
        "messageTag": "1521722870",
        "activityDateTime": "2018-05-15T09:56:40",
        "viewMessageLink": "https://123.esclick.me/test"
    },
    {
        "workflowId": 245460,
        "workflowBlockId": "e_e9e90420db06b64c157440cd60d0b73d",
        "sourceEventKey": "1258810400",
        "sourceEventTypeKey": "subscribeFromApi",
        "iid": "d08d1e15-ea92-4d5c-8dc9-6f750250a6ff",
        "contactId": 1258810400,
        "email": "[email protected]",
        "activityStatus": "CLICKED",
        "mediaType": "email",
        "messageId": 1242672,
        "messageInstanceId": 1630305,
        "messageName": "promo",
        "messageTag": "1522397496",
        "activityDateTime": "2018-05-15T04:45:04",
        "viewMessageLink": "https://123.esclick.me/test",
        "clickEventLink": "https://test.ua/promo/"
    },
    {
        "workflowId": 245460,
        "workflowBlockId": "e_e9e90420db06b64c157440cd60d0b73d",
        "sourceEventKey": "1258810400",
        "sourceEventTypeKey": "subscribeFromApi",
        "iid": "0ae4b6a3-59ad-426e-a40b-ce8f55bd40bc",
        "contactId": 1258810400,
        "email": "[email protected]",
        "activityStatus": "SPAM",
        "mediaType": "email",
        "messageId": 1242672,
        "messageInstanceId": 1630305,
        "messageName": "promo",
        "messageTag": "1522397496",
        "activityDateTime": "2018-05-15T08:23:56",
        "viewMessageLink": "https://123.esclick.me/test"
    }
]