Update Post Survey Redirect URL through REST API


How do we update the Redirect URL on the “Thank You Page” using the REST API? Here is a very simple python script that creates a new Survey object and updates the Redirect URL. However when I take the survey or view it in the Dashboard the Redirect URL is not updated.

params = {'api_token': settings.SG_API_TOKEN, 'options[internal_title]': 'Test Internal Title', 'title': 'Test Title', 'type': 'survey'}
base_url = 'https://restapi.surveygizmo.com/v5/survey'
r = requests.put(base_url, data=params)
redirect_url = 'http://google.com'
params = {'api_token': settings.SG_API_TOKEN, 'properties[url]': redirect_url}
url = "{base_url}/{survey_id}/surveyquestion/{question_id}".format(base_url=base_url, survey_id=r.json()['data']['id'], question_id=1)
z = requests.post(url, data=params)


{u’data’: {u’comment’: None, u’options’: [], u’description’: [], u’title’: {u’English’: u’Thank you for taking our survey. Your response is very important to us.’}, u’varname’: [], u’properties’: {u’url’: u’http://google.com’, u’map_key’: u’instructions’, u’hidden’: False}, u’has_showhide_deps’: None, u’base_type’: u’Decorative’, u’shortname’: None, u’type’: u’INSTRUCTIONS’, u’id’: 1}, u’result_ok’: True}

Lola Gill answered
    Lola Gill 6.78K Rep.

    It looks like you should be able to use the SurveyQuestion Sub-Object to update the url redirect url:


    You might consider creating a ‘question’ of type url as described in the create object call:


    This should allow you to create a new url redirect with the defined URL instead of utilizing the default post-survey action (unless you’ve already worked out the issue).

    Hope this helps a bit!

    Lola Gill answered


      Question stats

      • Active
      • Views514 times
      • Answers1 answer
      • Followers1 follower