Easymailing
Surveys

List audience surveys

GET /audiences/{audienceUuid}/surveys

GET/audiences/{audienceUuid}/surveys

Returns the surveys of an audience: quick polls (type poll, a single question answered inline from the email) and full surveys (type page, a public multi-question page). Filterable by status (draft | active | closed), type and name. Use list_audiences first to get the audienceUuid.

When to use: To see which polls and surveys an audience has and in which state they are, for example to pick one to link to a campaign or to read its results.

When not to use: To read one survey with its questions use get_survey; for its results use get_survey_stats.

Filters: name: partial match on the survey name. status: draft, active or closed. type: poll or page.

Permissions: Requires the manager role or higher, or the marketing.surveys.read capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

audienceUuid*string

UUID of the audience the survey belongs to. Get it with list_audiences.

Query Parameters

page?integer

The collection page number

Default1
itemsPerPage?integer

The number of items per page

Range0 <= value <= 50
Default30
name?string

Return only surveys whose name contains this text.

status?string

Return only surveys in this status: draft, active or closed.

type?string

Return only surveys of this type: poll or page.

Response Body

application/problem+json

application/problem+json

curl -X GET "https://api.easymailing.com/audiences/0df14405-90ff-4287-b3e4-ef088901ee6f/surveys?name=Newsletter&status=active&type=poll" \  -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",    "audience": "/entity/1",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }]