REST API Examples

Articles

Create a Table Question via the API
Did you know you can create a table question via the API?! You'll need a call to create the overall question and then a call for each row and column. Create the overall table question: https://restapi.surveygizmo.com/v4/survey/123456/surveypag...
Create a Poll and Poll Answer Options
Some users have requested an example call for creating a poll using the REST API. The below call creates a survey object with type=poll . When creating a survey object with type=poll the polloptions array is required. In the below call we specif...
PHP: Build an Array of Response Data
Some users have requested example scripts to parse the basic survey response array into something more malleable for working with the data. The following example is very similar to code we use to organize survey data into an array that is easier to ...
PHP: OAuth Sample Code
Hi Everyone! I know we've been promising some sample code for doing OAuth authentication with our API. So here is the first bit! I'd also like to apologize for the main API documentation. It has been updated -- but was pointing to the wrong ...
Survey Contacts from an Existing Database
Pulling contacts from an existing database for the purposes of surveying or other otherwise gathering information is one of the most common uses of the SurveyGizmo API. In this use-case example we'll cover how to create a campaign, add contacts,...
Create an Image Heatmap Question via API
Looking to create an Image Heatmap question via the API? You'll need use the surveyquestion and surveyoption endpoints to fully build out the question. 1. Create the Image Heatmap Question Start by creating the Image Heatmap question with th...
Create a Text Highlighter Question via the API
Looking to create an Text Highlighter question via the API? You'll need use the surveyquestion and surveyoption endpoints to fully build out the question. 1. Create the Text Highlighter Question Start by creating the Text Highlighter question ...