Modify Survey Settings
API Overview
- Function: Modify survey settings
- Request Method: POST
- Request URL: /api/surveys/{survey_id}/settings?appid={appid}&access_token={access_token}
Request Parameters
Parameter Name | Type | Required | Location | Description | Example |
---|---|---|---|---|---|
survey_id | integer | Yes | uri | Survey ID | 292190 |
redirect_url | string | No | body | Redirect URL after survey completion | https://example.com |
login_check | bool | No | body | Enable login verification | true |
is_answer_only_once | bool | No | body | Allow each user to answer only once | true |
is_allow_update_answer | bool | No | body | Allow answer modification | true |
state | integer | No | body | Status, 0: Draft, 2: Collecting, 3: Paused | 2 |
started_at | string | No | body | Survey start time | 2024-06-01 00:00:00 |
end_at | string | No | body | Survey end time | 2024-07-01 00:00:00 |
Request Example
{
"redirect_url": "https:/example.com",
"login_check": true
}
Response Examples
- Successful Request
{
"code": "OK",
"error": {
"event": "",
"type": "",
"params": null
},
"info": "",
"data": {
"result": "success"
},
"request_id": "8471407c-c732-4de2-861d-ea4a000d5d92"
}
- Failed Request
{
"code": "InvalidArgument",
"error": {
"type": "invalid_redirect_url",
},
"data": {},
"request_id": "ddec96d2-165e-4f3e-8a64-2057db116983"
}
Error Codes
error.type Error Code | Description |
---|---|
permission_denied | No modification permission |
invalid_redirect_url | Invalid URL |
invalid_argument | Parameter validation failed |
update_survey_attribute_error | Modification failed |
update_survey_detail_error | Modification failed |