Webhooks
Don’t call us, we call you if something important happens!
What’s a webhook
Webhooks are notifications that are triggered automatically when a specific event occurs in our platform; for example, when your questionnaire link is opened by a respondent. By using webhooks you enable SurveyLegend to talk to your website, webapp, or other systems you use, and notify about important events so that they can react accordingly.Adding webhooks for a survey
To add a webhook to a survey, go to My Surveys > select your desired survey > Navigate to the Configure step, and click on the tab.Adding a callback URL
When you add a webhook, the most important thing is to add a callback URL, in the webhook editor view. We currently support either HTTP or HTTPS URLs, so you can increase security by using an SSL-enabled URL. To further increase security.Note:
Keep your webhook URL private. Currently, the Webhooks API doesn’t include a way to
authenticate that data is coming from SurveyLegend. So if you somebody knows your webhook URL,
they can also send fake data to that URL, pretending it comes form SurveyLegend’s servers.
Supported Events
Our Webhooks implementation allows you to choose the events that will trigger a webhook, meaning that you receive only the information that you want. We support the following events:- When a survey is started
- When a survey is submitted
Supported data formats
When we send a notification to your specified URL, the notification comes with some attached data. You can decide which format you want the data to be in. Our Webhooks API currently supports these data formats:- JSON
- XML
- Web-Form
Attach responses
The webhook notification that you receive can even include survey questions, and responses that are entered by your respondents.Note:
Be careful and responsible about your respondents data! If you want to attach their responses
to the webhook notification, make sure you are using a HTTPS callback URL. The HTTPS protocol
will encode the attached data, making it impossible for hackers to read or copy them while they
are being transferred to your server. The responsibility is on your side, as responses may include
personal data about your responses. So, be careful, specially now when we have the GDPR law.
Storing your responses
Even though you receive a a copy of the responses with the webhook notification, SurveyLegend still stores the responses in our database as well. When you login to your account, you will be able to see them.Securing Webhooks
We currently support either HTTP or HTTPS URLs, so you can increase security by using an SSL-enabled URL. To further increase security. However, you may wish to take additional steps to ensure that information is coming from SurveyLegend.Note:
Keep your webhook URL private. Currently, the Webhooks API doesn’t include a way to
authenticate that data is coming from SurveyLegend. So if you somebody knows your webhook URL,
they can also send fake data to that URL, pretending it comes form SurveyLegend’s servers.
Tip:
When you use a secret Handshake key to sign the webhook notification data, you can make sure
that only incoming notifications that have the secret key are valid, and are really coming from
our server.