Surveys API
List surveys
Section titled “List surveys”List all surveys for an account:
GET /surveysResponse
Section titled “Response”Status: 200 OK[ { "id": 1, "name": "My Survey", "created_at": "2021-07-21T06:41:06-05:00", "updated_at": "2021-07-21T06:41:06-05:00", "nodeID": "..." }, "..."]The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of surveys.
Predefined Filters
Section titled “Predefined Filters”The following predefined filters are available:
/surveys/disabled: List all disabled surveys/surveys/enabled: List all enabled surveys
Collection Fields
Section titled “Collection Fields”By default the following fields will appear in collections of surveys:
id
name
created_at
updated_at
Obtain a different set of fields using the ?fields= parameter .
Filtering
Section titled “Filtering”Filtering is available for the following fields :
id
source
sourceID
created_at
updated_at
disabled
name
Sorting
Section titled “Sorting”By default a collection of surveys is sorted
ascending
by
id
.
The following fields are accepted by the ?sort= parameter :
id
sourceID
created_at
updated_at
Get a single survey
Section titled “Get a single survey”GET /surveys/:idResponse
Section titled “Response”Status: 200 OK{ "completion": null, "created_at": "2021-07-21T06:41:07-05:00", "disabled": false, "id": 12, "introduction": null, "name": "My Survey", "source": null, "sourceID": null, "updated_at": "2021-07-21T06:41:07-05:00", "...": "..."}The response contains these fields .
Create a survey
Section titled “Create a survey”POST /surveysWhen creating a new survey these fields are available.
Response
Section titled “Response”Status: 201 Created{ "name": "...", "...": "..."}The response contains all fields of the created survey and is similar to the response in Get a single survey .
Update a survey
Section titled “Update a survey”PATCH /surveys/:idWhen updating an survey these fields are available.
Response
Section titled “Response”Status: 200 OK{ "name": "...", "...": "..."}The response contains all fields of the updated survey and is similar to the response in Get a single survey .
Fields
Section titled “Fields”attachments
Readonly aggregated Attachments
created_at
Readonly datetime — The date and time at which the survey was created.
completion
Optional text (max 64KB) — The Completion field is used to enter content shown to respondents on completion of the survey.
completion_attachments
Writeonly attachments The attachments used in the Completion field.
disabled
Optional
boolean
, default:
false
— The Disabled box is checked when the survey may no longer be related to services and users should not be asked to use it to rate services it is linked to.
id
Readonly integer — The unique ID of the survey.
introduction
Optional text (max 64KB) — The Introduction field is used to enter content shown to respondents before the first question of the survey.
introduction_attachments
Writeonly attachments The attachments used in the Introduction field.
name
Required string (max 128) — The Name field is used to enter the name of the survey.
source
Optional string (max 30) - See source
sourceID
Optional string (max 128) - See source
updated_at
Readonly
datetime
— The date and time of the last update of the survey. If the survey has no updates it contains the
created_at
value.