surveys

List Post

POST
List surveys requested by the user.

Request

This endpoint expects an object.
created_by
list of stringsOptional
Filters for surveys created by any of these users.
created_date
unionOptional
Provides ways to specify date ranges on objects.
cursor
stringOptional
The cursor to resume iteration from. If not provided, then iteration starts from the beginning.
limit
integerOptional
The maximum number of surveys to return. If not set, then the default is '50'.
mode
enumOptional
The iteration mode to use. If "after", then entries after the provided cursor will be returned, or if no cursor is provided, then from the beginning. If "before", then entries before the provided cursor will be returned, or if no cursor is provided, then from the end. Entries will always be returned in the specified sort-by order.
Allowed values: afterbefore
modified_date
unionOptional
Provides ways to specify date ranges on objects.
name
list of stringsOptional
Filters for surveys by name(s).
sort_by
list of stringsOptional
Fields to sort the surveys by and the direction to sort them.

Response

This endpoint returns an object
surveys
list of objects
The list of the surveys.
next_cursor
stringOptional
The cursor used to iterate subsequent results in accordance to the sort order. If not set, then no later elements exist.
prev_cursor
stringOptional
The cursor used to iterate preceding results in accordance to the sort order. If not set, then no prior elements exist.
POST
1curl -X POST https://api.devrev.ai/surveys.list \
2 -H "Authorization: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{}'
200
Successful
1{
2 "surveys": [
3 {
4 "id": "id",
5 "schema": [],
6 "created_date": "2023-01-01T12:00:00Z",
7 "description": "description",
8 "display_id": "display_id",
9 "modified_date": "2023-01-01T12:00:00Z",
10 "name": "name"
11 }
12 ],
13 "next_cursor": "next_cursor",
14 "prev_cursor": "prev_cursor"
15}