Skip to main content

Get User Survey List

API Overview

  • Function: Get survey list for individual users or teams
  • Request Method: GET
  • Request URL: /api/surveys?appid={appid}&access_token={access_token}&user_id={50000000001}

Request Parameters

Parameter NameTypeLocationDescriptionExample
user_idintegerqueryStringUser ID or Team ID. For team authorization, you can use this parameter. Team ID can be found in the top-right avatar - Team Management at https://wesurvey.com292192
openidstringqueryStringUnique user identifier, can be used with third-party application authorization, obtained from web authorization callbackabcdefg
pageintegerqueryStringCurrent page number1
per_pageintegerqueryStringItems per page20

Response Parameters

Parameter NameTypeDescription
totalintegerTotal count
listarray[object]Survey list
list[_].idintegerSurvey ID
list[_].hashstringhash
list[_].titlestringSurvey title
list[_].stateintegerStatus, 0: Draft, 2: Collecting, 3: Paused

Response Examples

  • Successful Request
{
"code": "OK",
"error": {
"type": "",
},
"data": {
"total": 3,
"list": [
{
"id": 292189,
"hash": "65c6",
"title": "Survey Title",
"state": 2
},
{
"id": 292190,
"hash": "5e13",
"title": "Survey Title",
"state": 2
},
{
"id": 292192,
"hash": "d082",
"title": "Survey Title",
"state": 2
}
]
},
"request_id": "e4b27037-d876-427d-95c7-d5a737dd1677"
}
  • Failed Request
{
"code": "InvalidArgument",
"error": {
"type": "invalid_argument",
},
"data": {},
"request_id": "ddec96d2-165e-4f3e-8a64-2057db116983"
}

Error Codes

error.type Error CodeDescription
claim_errorPermission verification error
invalid_argumentParameter validation failed