Survey Webhooks

How survey webhooks work

Survey webhooks behave like global webhooks (SmartSurvey sends a request when an event occurs), but they add survey-specific configuration and advanced request options.

Survey webhooks are created within a survey and can be configured independently per survey.

Where to configure survey webhooks

  1. Open the survey you want to configure.
  2. Go to Automate → Webhooks.
  3. Click Add New Webhook
  4. Enter a name,. the target endpoint, and select the events you want it to trigger on to complete basic configuration.

Advanced request customisation

More advanced configuration options can be access by setting the Advanced Request Settings option to on.

This gives you extra options that can be configured to customise the outbound request, for example:

  • Changing request method (POST / PUT / GET / PATCH / DELETE)
  • Setting additional headers (e.g., Authorization, X-Webhook-Source)
  • Body settings for POST / PUSH / PATCH requests
    • Choose between JSON , XML , Plain Text, or None.
    • For JSON, XML, and None, you can choose to either use the default body format or define your own using the editor and piping tags.

Piping

Unlike global webhooks, survey webhooks allow you to use piping as part of the webhook configuration. You can include piping tags in the endpoint URL and when adding new headers via the advanced options. Examples are below.

Endpoint URL

  • hooks.example.com/surveys/[survey(id)]?nps_score=[question(1)]

Header Value

  • X-Survey-Title: [survey(title)]

Example Custom Body

{
  "event": "response_completed",
  "survey_id": "[survey(id)]",
  "response_id": "[response(id)]",
  "nps_score": "[question(1)]"
}