Surveys
List of operations for the resource
Name | URL | Description |
| Returns a list of all surveys for the logged-in user. Surveys are sorted by date added in ascending order. | |
| Returns a list of surveys matching the search criteria. Surveys are sorted by date added in ascending order. | |
| Detailed information about the survey. Unlike data from the previous operation, this will return information about the domain, theme, and basic information about questions divided into pages. |
Description of response parameters
Name/path | Description | Possible values |
| Survey ID | |
| Survey title | |
| Survey title displayed in the user panel | |
| Survey title used in „friendly links” | |
| Survey creation date | |
| Date of the first publication of the survey – start of collecting results |
|
| Date of the last modification of the survey |
|
| Date of the first end of collecting results |
|
| Number of survey completions | |
| Survey status |
|
| Survey type |
|
| Personal data in the survey |
|
| Survey interface language |
|
| Access to the survey |
|
| Identification of respondents |
|
| Survey access password. Set if | |
| Survey completion |
|
| Displaying a button allowing contact with the survey author |
|
| Displaying question numbers |
|
| Displaying the survey completion progress bar |
|
| Respondents can postpone completion for later |
|
| Displaying the 'Back' button in surveys with more than one page |
|
| The value of the completion limit after which the study will end | |
| Date after which the survey will be automatically activated | |
| Date after which the survey will automatically end | |
| Information on whether the survey has been archived |
|
| Action after completion |
|
| The address of the redirect page to which the respondent will be redirected after completing the survey, if | |
| Thank you text displayed after completing the survey | |
| Question type |
|
List of surveys
URL
(GET) https://app.customerhero.com/api/v2/surveysOptional parameters (POST)
Name | Description |
| Limit on the number of surveys |
| List offset |
Example response
[
{
"id":69047,
"title":"Test survey title",
"url_title":"test-survey-title",
"date_created":"2011-09-19 13:22:06",
"date_published":"2011-09-19 13:23:10",
"date_modified":"2011-09-19 13:23:10",
"date_end":null,
"answers_count":0,
"status":1,
"type":0,
"personal_data":0,
"lang_code":"pl",
"security_level":0,
"anonymous":0,
"password":"",
"public_results":1,
"many_answers_from_cookie":1,
"email_notification":0,
"comments":1,
"social_media":1,
"contact_with_author_form":1,
"question_numbers":1,
"progress_bar":0,
"partial_answers":0,
"reversible":0,
"answers_limit":0,
"expiration_date":null,
"search_engines":1,
"action_after_answer":0,
"redirection":null,
"thank_you_text":"Thank you for completing the survey"
},
{
...
}
]Returned errors
None
Searching for surveys
URL
(GET) https://app.customerhero.com/api/v2/surveys/searchOptional parameters (POST)
Name | Description |
| Survey title |
| Survey creation date. The date must be passed in |
| Date of the first publication of the survey. The date must be passed in |
| Date of the first end of collecting results. The date must be passed in |
| Survey status. Allowed values are: |
| Survey type. Allowed values are: |
| Survey security level. Allowed values are: |
| Limit on the number of surveys |
| List offset |
Example response
[
{
"id":69047,
"title":"Test survey title",
"internal_title":"[Project] Test survey title",
"url_title":"test-survey-title",
"date_created":"2011-09-19 13:22:06",
"date_published":"2011-09-19 13:23:10",
"date_modified":"2011-09-19 13:23:10",
"date_end":null,
"answers_count":0,
"status":1,
"type":0,
"personal_data":0,
"lang_code":"pl",
"security_level":0,
"anonymous":0,
"password":"",
"public_results":1,
"many_answers_from_cookie":1,
"email_notification":0,
"comments":1,
"social_media":1,
"contact_with_author_form":1,
"question_numbers":1,
"progress_bar":0,
"partial_answers":0,
"reversible":0,
"answers_limit":0,
"expiration_date":null,
"search_engines":1,
"action_after_answer":0,
"redirection":null,
"thank_you_text":"Thank you for completing the survey"
},
{
...
}
]Returned errors
400 Bad request– Invalid date format, invalid status, or invalid security level500 Internal Server Error– Internal server error.
Survey information
URL
(GET) https://app.customerhero.com/api/v2/surveys/:idParameters
none
Example response
{ "id":69047, "title":"Test survey title", "url_title":"test-survey-title", "internal_title":"[Project] Test survey title", "date_created":"2011-09-19 13:22:06", "date_published":"2011-09-19 13:23:10", "date_modified":"2011-09-19 13:23:10", "date_end":null, "answers_count":0, "status":1, "type":0, "personal_data":0, "lang_code":"pl", "security_level":0, "anonymous":0, "password":"", "public_results":1, "many_answers_from_cookie":1, "email_notification":0, "comments":1, "social_media":1, "contact_with_author_form":1, "question_numbers":1, "progress_bar":0, "partial_answers":0, "reversible":0, "answers_limit":0, "expiration_date":null, "search_engines":1, "action_after_answer":0, "redirection":null, "thank_you_text":"Thank you for completing the survey", "domain":{ "type":"subdomain", "main":false, "address":"subdomain.customerhero.com" }, "pages":[ { "id":261181, "number":1, "questions":[ { "id":804039, "type":9, "order":1, "number":0, "text":"Descriptive block", "desc":"Welcome.", "date_created":"2011-05-06 00:39:14" "internalName": "" }, { "..." } ] }, { "id":261182, "number":2, "questions":[ { "id":804041, "type":0, "order":1, "number":1, "text":"How did you hear about our restaurant?", "desc":"", "date_created":"2011-06-27 16:29:50" "internalName": "" }, { "..." } ] } ], "theme": { "id": 252445, "title": "Theme name", "font": { "size": "medium", "style": "poppins" }, "logo": { "url": "https://files.customerhero.com/user_files/user_logo/424242/image_1765414061.png", "size": 38, "position": "left", "alt": "Logo" }, "backgroundImage": null, "colors": { "questionText": "#e5e7eb", "background": "#121212", "controlsBorderAndBackground": "#cbb090", "buttonTextColor": "#ffffff", "buttonBackgroundColor": "#cbb090" }, "customCss": "" }, "folder": "My projects" }
Returned errors
404 Not Found– The resource was not found or does not exist.