Reputation: 125
I would like to receive webhook calls to my own service when a survey has been completed. I do not want to poll surveymonkey for results. I noticed there is some obscure documentation here: http://help.surveymonkey.com/articles/en_US/kb/WebHook-PUT but it is not useful.
Has anyone had any experience with this?
Upvotes: 3
Views: 11601
Reputation: 2285
You can setup a webhook with SurveyMonkey API v3. To create a webhook, you would make a request like:
POST /v3/webhooks
{
"name": "My Survey Completed Webhook",
"event_type": "response_completed",
"object_type": "survey",
"object_ids": ["<survey_id1>", "<survey_id2>" ...],
"subscription_url": "https://example.com/surveys_responses",
}
Now every time a survey is completed, a notification will be made to the subscription_url
specified when creating the webhook. The notification will be a skinny payload with the response_id
which you can use to fetch responses:
GET /v3/surveys/{id}/responses/{id}
Upvotes: 14