Webhooks

Webhooks are a way to notify you of an event that has occurred on the system using custom callbacks over HTTP.

Configure the webhook in the enKodSettingsto receive event notifications to your URL.

You can specify a separate URL for each event or a common one for all events. Before saving, you should test the requests by clicking on the corresponding button. We will send test data to the specified URL, so you can see the structure and we will check the availability of the link. If the testing is successful, the webhook can be saved.

POST requests for events are currently available:

  • Message sent (Email channel only)
  • Delivery error (Email channel only)
  • Message opened (Email channel only)
  • Click in message (Email channel only)
  • Complaint (Email channel only)
  • Subscribing to a mailing group (Email channel only)
  • Unsubscribe from a mailing group (Email channel only)
  • Add a contact

The body is fixed and looks as follows:

Message sent

{
  "event": "message sent",
  "message_id": 4,
  "message_uid": "0123456789_012_012_01234",
  "sending_type": "instant",
  "name": "Sending message (test)",
  "from": "[email protected]",
  "to": "[email protected]"
}

Where.

  • event - event (message sent)
  • message_id - message identifier
  • message_uid - unique uid of the message
  • sending_type - message sending condition
    • instant
    • scheduled
    • regular
    • byAPI - by API
    • byEvent - by event
    • DOI - confirmation letter
    • scenario - script message
  • name - message subject
  • from - sender's email
  • to - recipient email

Delivery error

{
  "event": "delivery bounce",
  "message_id": 4,
  "message_uid": "0123456789_012_012_01234",
  "sending_type": "instant",
  "name": "Error while sending message (test)",
  "from": "[email protected]",
  "to": "[email protected]",
  "error_message": "Some error message"
}

where

  • event - event (delivery error)
  • message_id - message identifier
  • message_uid - unique uid of the message
  • sending_type - message sending condition
    • instant
    • scheduled
    • regular
    • byAPI - by API
    • byEvent - by event
    • DOI - confirmation letter
    • scenario - script message
  • name - message subject
  • from - sender's email
  • to - recipient email
  • error_message - error text

Opening message

{
  "event": "message open",
  "message_id": 4,
  "message_uid": "0123456789_012_012_01234",
  "sending_type": "instant",
  "name": "Open message (test)",
  "from": "[email protected]",
  "to": "[email protected]"
}

where

  • event - event (message opening)
  • message_id - message identifier
  • message_uid - unique uid of the message
  • sending_type - message sending condition
    • instant
    • scheduled
    • regular
    • byAPI - by API
    • byEvent - by event
    • DOI - confirmation letter
    • scenario - script message
  • name - message subject
  • from - sender's email
  • to - recipient email

Click in message

{
  "event": "message clicked",
  "message_id": 4,
  "message_uid": "0123456789_012_012_01234",
  "sending_type": "instant",
  "name": "Click in message (test)",
  "from": "[email protected]",
  "to": "[email protected]",
  "click_url": "https://clicked.link/"
}

where

  • event - event (click in message)
  • message_id - message identifier
  • message_uid - unique uid of message
  • sending_type - message sending condition
    • instant
    • scheduled
    • regular
    • byAPI - by API
    • byEvent - by event
    • DOI - confirmation letter
    • scenario - script message
  • name - message subject
  • from - sender's email
  • to - recipient email
  • click_url - click URL

Complaint

{
  "event": "сomplaint",
  "message_id": 4,
  "message_uid": "0123456789_012_012_01234",
  "sending_type": "instant",
  "name": "Complaint in message (test)",
  "from": "[email protected]",
  "to": "[email protected]"
}

where

  • event - event (complaint)
  • message_id - message identifier
  • message_uid - unique uid of message
  • sending_type - message sending condition
    • instant
    • scheduled
    • regular
    • byAPI - by API
    • byEvent - by event
    • DOI - confirmation letter
    • scenario - script message
  • name - message subject
  • from - sender's email
  • to - recipient email

Subscription to a mailing group

{
  "event": "mailing group subscribe",
  "email": "[email protected]",
  "group_id": 4,
  "group_name": "Person subscribe (test)",
  "channel": "email"
}

where

  • event - event (subscription to a mailing group)
  • email - contact's email
  • group_id - mailing group identifier
  • group_name - system name of the mailing group
  • channel - channel of the mailing group

Unsubscribe from mailing group

{
  "event": "mailing group unsubscribe",
  "email": "[email protected]",
  "group_id": 4,
  "group_name": "Person unsubscribe (test)",
  "channel": "email"
}

where

  • event - event (unsubscription from a mailing group)
  • email - contact's email
  • group_id - mailing group identifier
  • group_name - system name of the mailing group
  • channel - channel of the mailing group

Adding a contact

{
  "event": "contact adding",
  "email": "[email protected]",
  "phone": "80123456789",
  "groups_names": [
    "test_group_0",
    "test_group_1"
  ],
  "groups_ids": [
    0,
    1
  ]
}

where

  • event - event (adding a contact)
  • email - contact's email
  • phone - contact's phone number
  • groups_names - system names of mailing groups to which the contact was subscribed when adding the contact
  • groups_ids - identifiers of mailing groups to which the contact was subscribed when added
Last modified: 2023.12.13 10:34 by Anastasia Aniskova