Get a survey
GET /audiences/{audienceUuid}/surveys/{uuid}
/audiences/{audienceUuid}/surveys/{uuid}Returns a survey with its questions and answer options, status, configuration (show results, redirect URL) and, when the survey is an active page survey, the public URL of its multi-question page.
When to use: To read the questions, options and state of a survey you already know, for example before editing or activating it, or to filter its answers in a workflow: each question gives its answer_field, the field of a condition in the answersFilter of «Survey answered», and the text of its options is the value of a choice.
When not to use: To find surveys use list_surveys; for the answers received use get_survey_stats.
Permissions: Requires the manager role or higher, or the marketing.surveys.read capability.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the audience the survey belongs to. Get it with list_audiences.
UUID of the survey. Get it with list_surveys.
Response Body
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://api.easymailing.com/audiences/0df14405-90ff-4287-b3e4-ef088901ee6f/surveys/b7d2f6a3-1c48-4e9b-8a05-6f3e2d1c9b74" \ -H "X-Auth-Token: YOUR_API_KEY"{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "name": "string", "type": "poll", "status": "draft", "locale": "string", "show_results": true, "redirect_url": "http://example.com", "questions": [ { "answer_field": "string", "position": 0, "text": "string", "type": "single_choice", "display": "default", "required": true, "options": [ { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "text": "string", "position": 0 } ] } ], "public_url": "http://example.com", "audience": "/entity/1", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}