View the general structure of webhook data delivery
If you've reached this article, you've learned the basics of webhooks and how to set them up. Now, let's take a look at the Webhook's Delivery Structure.
Webhooks are sent to the target URL as an application/json POST request. All survey response data is sent including any labels that have been applied to question pages, questions and answer choices. The data sent is formatted as follows:
Example Data:
Survey:
{
“custom_params”:{
"key": "value"
}
“results”:[],
“survey_id”:####,
“survey_name”: “Survey Name”
}
Question Results:
Question results follow the same general structure, however it may vary slightly across different question types. The general structure results follow is:
"results":[
{
"has_variants":true/false,
"id":####, "name":"Question Text”,
"questions":[
{
"answers":[
Important Notes:
- Labels: Where "tag": is listed as null, if you have added a label to any of the survey elements, null will be replaced with the label's text
- Variants: Where "has_variants" is listed as "true" the following will be included at the end of the relevant question page delivery after the question type:
"variant_id": 51526,
"variant_name": "Variant Two"
- Welcome Page checkbox values are not sent with Webhook deliveries
View the specific structure based on question type.