zenloop Developer Hub

Welcome to the zenloop developer hub. You'll find comprehensive documentation to help you start working with zenloop as quickly as possible, as well as support if you get stuck. Happy looping!

Get Started    

Alert Webhook

zenloop's Alert Webhook will notify a URL of your choice via HTTP POST with information about answers that you receive that fit the rules you set in your alerts.

1. Setup

To setup the webhook login to our web interface and:

  1. Go to our settings --> notifications and create an alert
  2. Customise the alert and select "webhook" as your send to option
  3. Add your preferred URL and save the alert

The Alert Webhook will not follow redirects. Please make sure to use the correct URL, or posting will fail.

2. Requests

You will receive an HTTP POST containing a JSON object of the contents of the alert shortly after we receive the answer.

If we do not get a 2xx response, we will repeat the attempt 5 times over 50 minutes, before dropping the request.

3. Alert POST Example

{
  "alert": {
    "id": "NktCUnJTZWxUVUZxWTFEWkJkc3pLdzBzOEV6bW9OamxqOTdPMjJJOEJyWT0=",
    "name": "NPS alert"
  },
  "answer": {
    "updated_at": "2017-07-12T09:00:41Z",
    "score_type": "promoter",
    "score": 10,
    "inserted_at": "2017-07-12T09:00:35Z",
    "id": "QWNGbzdkdlF5RU94SnhkMjRkU3RST0QwZ29EaU43dmJ6eUNPSUc0eVd1Yz0=",
    "comment": "Awesome!"
  },
  "survey": {
    "title": "Test survey",
    "id": "YjN6RU9pczhyUjBMNStOOWo5VjQ0RkE3RmZLK0lIeE5xZmYwS0Z3Z0dxZz0=",
    "channel_type": "email"
  },
  "recipient": {
    "last_name": null,
    "id": "ZWpMa3dxUmRPcHdwZFd1L1NnU3dzQWFHN0tqaGZwUndRTE1LZ2JMWjZuTT0=",
    "first_name": "Test",
    "email": "test@example.com"
  },
  "properties": [
    {
      "value": "USA",
      "name": "country"
    }
  ]
}
{
  "alert": {
    "id": "NktCUnJTZWxUVUZxWTFEWkJkc3pLdzBzOEV6bW9OamxqOTdPMjJJOEJyWT0=",
    "name": "NPS alert"
  },
  "answer": {
    "updated_at": "2017-07-12T09:00:41Z",
    "score_type": "promoter",
    "score": 10,
    "inserted_at": "2017-07-12T09:00:35Z",
    "id": "QWNGbzdkdlF5RU94SnhkMjRkU3RST0QwZ29EaU43dmJ6eUNPSUc0eVd1Yz0=",
    "comment": "Awesome!"
  },
  "survey": {
    "title": "Test survey",
    "id": "YjN6RU9pczhyUjBMNStOOWo5VjQ0RkE3RmZLK0lIeE5xZmYwS0Z3Z0dxZz0=",
    "channel_type": "link"
  },
  "recipient": null,
  "properties": []
}

Alert Webhook

zenloop's Alert Webhook will notify a URL of your choice via HTTP POST with information about answers that you receive that fit the rules you set in your alerts.