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 SettingsWebhooks to 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 (Email)

{
  "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 - scenario message
  • name - message subject
  • from - sender's email
  • to - recipient's email

Delivery bounce (Email)

{
  "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 bounce)
  • 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 - scenario message
  • name - message subject
  • from - sender's email
  • to - recipient's email
  • error_message - bounce text

Opening a message (Email)

{
  "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 - scenario message
  • name - message subject
  • from - sender's email
  • to - recipient's email

Click in the message (Email)

{
  "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 - scenario message
  • name - message subject
  • from - sender's email
  • to - recipient's email
  • click_url - click URL

Complaint (Email)

{
  "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 - scenario message
  • name - message subject
  • from - sender's email
  • to - recipient's email

Template message sent (WhatsApp)

{
  "event": "whatsapp template sent",
  "template_name": "template_example",
  "message_id": 123,
  "sending_type": "scenario",
  "from_number": "70000000000",
  "to_number": "71111111111"
}

where:

  • event - event (template message sent)
  • template_name - template name
  • message_id - message id
  • sending_type - message sending condition
    • scenario - scenario message
  • from_number - sender number (in format 7хххххххххх)
  • to_number - recipient number (in format 7хххххххххх)

Template message delivered (WhatsApp)

{
  "event": "whatsapp template delivered",
  "template_name": "template_example",
  "message_id": 123,
  "sending_type": "scenario",
  "from_number": "70000000000",
  "to_number": "71111111111"
}

where:

  • event - event (template message delivered)
  • template_name - template name
  • message_id - message id
  • sending_type - message sending condition
    • scenario - scenario message
  • from_number - sender number (in format 7хххххххххх)
  • to_number - recipient number (in format 7хххххххххх)

Template message read (WhatsApp)

{
  "event": "whatsapp template delivered",
  "template_name": "template_example",
  "message_id": 123,
  "sending_type": "scenario",
  "from_number": "70000000000",
  "to_number": "71111111111"
}

where:

  • event - event (template message read)
  • template_name - template name
  • message_id - message id
  • sending_type - message sending condition
    • scenario - scenario message
  • from_number - sender number (in format 7хххххххххх)
  • to_number - recipient number (in format 7хххххххххх)

Incoming message received (WhatsApp)

{
   "event": "whatsapp inbox message received",
   "message": "some text",
   "from_number": "71111111111",
   "to_number": "70000000000"
}

where:

  • event - event (incoming message received)
  • message - message (text of the incoming message)
  • from_number - sender number: contact who sent the incoming message (in format 7хххххххххх)
  • to_number - recipient number: WA number set up in your account (in the format 7хххххххххх)

Template message delivery bounce (WhatsApp)

{
   "event": "whatsapp template bounce",
   "template_name": "template_example",
   "message_id": 123,
   "sending_type": "scenario",
   "from_number": "70000000000",
   "to_number": "71111111111",
   "error_message": "Some error message"
}

where:

  • event - event (template message delivery bounce)
  • template_name - template name
  • message_id - message id
  • sending_type - message sending condition
    • scenario - scenario message
  • from_number - sender number (in format 7хххххххххх)
  • to_number - recipient number (in format 7хххххххххх)
  • error_message - bounce text

Subscription to a mailing group (Email)

{
  "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 (Email)

{
  "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: 2024.07.17 15:19 by Elizaveta Ivannikova