Webhooks

Webhooks are used to send events from Maître to your server.

To enable webhooks, go to your widget dashboard > " Advanced Settings" > "Webhooks".
From there, click on the "Add Webhook" button and add the url of your webhook.

Don't forget to save your changes!


How webhooks work

We send a POST http request with a JSON payload when specific events occur.

We send 4 types of events:

  • new_registration
    is called when a new person subscribes to your list and verifies their email address. If you are using our API V2 and disable the double-optin, this webhook is called as soon as the person is subscribed to the list.
  • subscriber_promoted
    is called when you promote a subscriber
  • subscriber_deleted
    is called when you delete a subscriber
  • bonus_unlocked
    is called only for lead magnets, when a subscriber unlocks a bonus

The event "new_registration" is triggered when the user verifies his email. The Json object sent for  new_registration will contain the following parameters:

{
  list_uuid: "MFXXXX", //The UUID of your list
  subscriber_id: "sub_123ABC", // Subscriber's ID
  response: "new_registration",
  name: "John Doe", //Subscriber's name
  first_name: "John",
  last_name: "Doe",
  email: "john.doe@email.com", //Subscriber's email
  code: "2hg36dvs", //Subscriber's unique referral code
  source: "facebook", //Subscriber's source. If the subscriber doesn't have a source the value will be "direct_visit"
  referred: true,
  referral: {
    name: "Mark",
    email: "mark@yahoo.com",
    code: "hxgs6csgy",
    people_referred: 26,
    points: 27
  }, //This property can have 3 possible values: an empty string (if the subscriber has not been referred), an object containing data of the referral (if the subscriber has been referred) or "subscriber_deleted" (if the subscriber has been referred but the user has been deleted.)
  referral_link: "http://mywebsite.com/LINK_PLAIN",
  people_ahead: 2873 //number of people in the list in front of the current subscriber (Only for Waiting lists)
}

The Json object sent for subscriber_promoted will contain the following parameters:

{
  list_uuid: "MFXXXX", //The UUID of your list
  subscriber_id: "sub_123ABC", // Subscriber's ID
  response: "subscriber_promoted",
  name: "John Doe", //Subscriber's name
  first_name: "John",
  last_name: "Doe",
  email: "john.doe@email.com", //Subscriber's email
  code: "2hg36dvs", //Subscriber's unique referral code
  source: "facebook", //Subscriber's source. If the subscriber doesn't have a source the value will be "direct_visit"
  referred: true,
  referral: {
    name: "Mark",
    email: "mark@yahoo.com",
    code: "hxgs6csgy",
    people_referred: 26,
    points: 27
  }, //This property can have 3 possible values: an empty string (if the subscriber has not been referred), an object containing data of the referral (if the subscriber has been referred) or "subscriber_deleted" (if the subscriber has been referred but the user has been deleted.)
  referral_link: "http://mywebsite.com/LINK_PLAIN"
}

The Json object sent for  subscriber_deleted will contain the following parameters:

{
  list_uuid: "MFXXXX", //The UUID of your list
  subscriber_id: "sub_123ABC", // Subscriber's ID
  response: "subscriber_deleted",
  name: "John Doe", //Subscriber's name
  first_name: "John",
  last_name: "Doe",
  email: "john.doe@email.com" //Subscriber's email
}

The Json object sent for  bonus_unlocked will contain the following parameters:

{
  list_uuid: "MFXXXX", //The UUID of your list
  subscriber_id: "sub_123ABC", // Subscriber's ID
  response: "bonus_unlocked",
  name: "John Doe", //Subscriber's name
  first_name: "John",
  last_name: "Doe",
  email: "john.doe@email.com" //Subscriber's email
  code: "2hg36dvs", //Subscriber's unique referral code
  people_referred: 3 //Number of people referred
}

Errors

Please send back a blank response with a status code of 200.
All not-200 responses will be considered errors. After 10 consecutive bad responses the webhook will be disabled.

If a webhook fails, we will try to deliver it 3 times over a period of 5 minutes.

How to test a webhook

To test a webhook just click on the link "Test" next to the webhook url you want to test.

We will ping your webhook url with a json file containing fake data.

If you don't see the "Test" link it means that you haven't saved your changes or your webhook is disabled. If it's the former, try to save and reload the page.

Still need help? Contact Us Contact Us