The following API calls are currently available for the Survey object:
For info on returned fields and example returns go to Survey Object Returned Fields.
GET LIST - Get a list of all of your surveys. View Example Return.
https://restapi.surveygizmo.com/v5/survey
Parameters | Example | Required |
---|---|---|
Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True |
page | page=3 | False |
resultsperpage | resultsperpage=100 | False |
filters | filter[field][0]=subtype&filter[operator][0]==&filter[value][0]=survey | False |
GET SURVEY - Get information about a specified survey. View Example Return.
https://restapi.surveygizmo.com/v5/survey/123456
Parameters | Example | Required |
---|---|---|
Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True |
metaonly (exclude page info) | false | False |
CREATE SURVEY - Create a new survey. View Example Return.
https://restapi.surveygizmo.com/v5/survey/?_method=PUT&title=Title&type=survey
Parameters | Example | Required |
---|---|---|
Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True |
title | My New Survey | True |
type | survey, form, poll, quiz | True |
status | launched, closed, deleted | False |
theme* | 11147 | False |
team | 456789 | False |
options[folder_id] | 12345 | False |
options[internal_title] | Internal Title | False |
options[overall_quota] | 100 | False |
options[auto_close] | Y-m-d H:i:s | False |
blockby | NONE, IP, COOKIE | False |
Poll-Specific Parameters | Example | Required |
polloptions | polloptions[0]=option 1&polloptions[1]=option 2 | True |
polltype | radio, image, ranking | False |
pollwidth | 140, 300, 600 | False |
*The theme parameter only supports saved themes in your Theme Library. To obtain the ID, go to Account > Libraries > Survey Themes and select the theme you wish to use. The ID will display in the URL.
UPDATE/COPY SURVEY - Update and/or copy a specified survey. View Example Return.
https://restapi.surveygizmo.com/v5/survey/123456?_method=POST
Parameters | Example | Required |
---|---|---|
Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True |
title | My New Survey | False |
status | launched, closed, deleted | False |
theme* | 11147 | False |
team | 456789 | False |
options[folder_id] | 12345 | False |
options[internal_title] | Internal Title | False |
options[overall_quota] | 100 | False |
options[auto_close] | Y-m-d H:i:s | False |
blockby | NONE, IP, COOKIE | False |
copy | true | False |
Poll-Specific Parameters | Example | Required |
polloptions | polloptions[0]=option 1&polloptions[1]=option 2 | False |
polltype | radio, image, ranking | False |
*The theme parameter only supports saved themes in your Theme Library. To obtain the ID, go to Account > Libraries > Survey Themes and select the theme you wish to use. The ID will display in the URL.
DELETE SURVEY - Delete a specified survey. View Example Return.
https://restapi.surveygizmo.com/v5/survey/123456?_method=DELETE
Parameters | Example | Required |
---|---|---|
Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True |