Webhooks allow you to trigger external services in response to events in MyDataHelps. When one such event occurs, the system will make a HTTP POST
request to the URL configured in the webhook. The payload of the POST
will contain details about the event, such as the event type and the participant that triggered it.
One way to use webhooks is by leveraging Amazon Web Services (AWS). For example, you might implement some logic in an AWS Lambda that is triggered by the “Survey Submitted” webhook whenever a survey is completed. The workflow would be:
You can also implement a webhook endpoint in your own web application. All it takes is an endpoint that the webhook can send a REST POST
request to.
The following MyDataHelps events can trigger webhooks. View each event for details about how the event is triggered and what data is included in the webhook request payload.
Event | Description |
Survey Submitted | This type of webhook can be activated when specific survey(s) are completed. |
Schedule Triggered | This type of webhook can be activated from within a project schedule, such as on participant enrollment. |
To set up a webhook, open up your Project Settings screen and select the “Webhooks” section.
Delete a webhook by clicking the trash icon.
When a webhook is set to “Test” mode, a test button appears next to it. This lets you to test your webhook by making a POST
request with sample data to your webhook endpoint when you click the “Send Sample” button.
You can switch a webhook between “Live” mode and “Test” mode at will, though it is suggested that you maintain separate endpoints for testing and your live project to avoid mingling test data with your real data.