GET: https://{{env}}.survey2connect.com/v2/api/surveys/{{survey_id}}The value of environment {{env}} variable depends upon your datacenter. Refer to the Environment page for more details.
Headers
"Content-Type": "application/json"Authorization
type: Api Key
Key: x-api-key
token: value from portal Request Parameter
Path Parameter
{{survey_id}}: Unique Survey ID.Request Sample
cURL
curl --location --request 'https://az1.survey2connect.com/v2/api/surveys/survey_id' \
--header 'Authorization: Bearer eyJraWQiOiJzM3E1OWF2cFdIcXVKa0I0MjRpcFpqQVN0dXAzQzFkZEhVM3k2TjNZSXRjPSIsImFs' \
JavaScript
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer eyJraWQiOiJzM3E1OWF2cFdIcXVKa0I0MjRpcFpqQVN0dXAzQzFkZEhVM3k2TjNZSXRjPSIsImFs”);
var requestOptions = {
method: DELETE,
headers: myHeaders,
redirect: 'follow'
};
fetch("https://az1.survey2connect.com/v2/api/surveys/survey_id", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error)); Responses
{
"data": {
"settings": {
"question_settings": {
"single_ques_focus_desktop": 1,
"single_ques_focus_tab_mobile": 1,
"show_ques_prog_desktop": 1,
"show_ques_prog_mob_tab": 1,
"show_ques_num": 1,
"show_ques_symbol": 1
},
"page_settings": {
"show_prog": {
"format": {
"show_pages": 1,
"show_pages_mobile": 1
},
"has_prog": 0,
"show_title": 0,
"position": 0
},
"show_title": 1,
"show_page_number": 0,
"show_exit": 0,
"show_page_title": 1,
"required": 1
}, "button_settings": {
"auto_transition": 1,
"show_next_button": 0,
"show_prev_button": 0,
"show_done_button": 0,
"show_nav_buttons": 1
},
"other_settings": {
"survey_title_on_lang_selection": 0,
"disable_resp_edata": 0,
"track_location": 0,
"collect_over_mobile": 0,
"theme_for_offline_app": 0,
"survey_level_audio_recoding": false
},
"buttons_text": {
"done_button": "Done",
"previous_button": "Prev",
"ok_button": "Ok",
"next_button": "Next",
"exit_button": "Exit",
"end_button": "Submit"
}
},
"default_lang": {
"name": "English",
"langKey": "eng_us"
},
"intro_page": {
"title": "",
"description": "Hello,\n\n In our continuous efforts to provide you with the best possible service, we would like to understand your feedback. Please take out approximately 2 minutes of your time to complete the survey.\n\n Start the survey by clicking the button below."
},
"survey_finish": {
"disqualification_page": {
"type": 0,
"message": "Oops! You have been disqualified due to logic restrictions!",
"url": "http://localhost:9995"
},
"disqualification_page_quota": {
"type": 0,
"message": "Oops! You have been disqualified due to quota restrictions!",
"url": "http://localhost:9995"
},
"end_page": {
"type": 1,
"url": "http://localhost:9995"
},
"exit_page": {
"url": "http://localhost:9995"
},
"quota_page": {
"type": 1,
"message": "Quota Full! This survey is currently closed.",
"url": "http://localhost:9995"
}
},
"version": 4,
"favourite": 0,
"_id": "6489585843356d4d575e9734",
"title": "sa",
"category": "Others",
"take_title": "sa",
"project_id": "S100000016",
"language": [],
"modified": "Wed Jun 14 2023 11:45:58",
"created": "Wed Jun 14 2023 11:34:08",
"no_of_pages": 2,
"no_of_ques": 10
}
} {
"error": {
"name": "Unauthorized",
"message": "The authorization token was not provided."
}
} {
"error": {
"name": "Internal Server Error",
"message": "We were not able to process your request"
}
}Note: Please do not share your tokens in publicly accessible areas or to anyone. Also, this token generated is valid for 24 hours only. After its expiry, you can regenerate the access token from the same API endpoint by passing the username and password or from the refresh token API with the help of refresh token.
Ask a human