DELETE: https://{env}-api.xebo.ai/v3/survey-management/surveys/{survey_id}/blocks/{block_id}/questions/{ques_id}
The value of environment {{env}} variable depends upon your datacenter. Refer to the Environment page for more details.
"Content-Type": "application/json"
type: Bearer type
token: <access token> granted from login API
Or
x-api-key: <api key copied from the platform>
Content-Type: application/json
curl --location --request DELETE 'https://az4-api.xebo.ai/v3/survey-management/surveys/951381d4-e7d1-4e5a-85f1-be379b18045a/blocks/5da2381b-4cd4-4195-beee-5c4f1369c2c1/questions/99ad333c-1821-478b-b02c-53524150b5e1' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzI0Mzk2ODA1LCJpYXQiOjE3MjQzMTA0MDUsImp0aSI6IjQ4ZmM1YTIxNDNmODQ5MjdhZWY5YTZmZjlmOWU5ODZjIiwidXNlcl9pZCI6IjJkNWQxMTk5LTY4ZTUtNDMyMC1hMjEyLWM2ZjQ1NWU3ZDljYyIsImN1c3RvbV9jbGFpbSI6Ikg0c0lBSVhqeG1ZQy80MVh1WkxqTmhEOWxTbkZabGtIZFczbXhJbERPMGMxZ1NhRkZRaGdBVkFhemRiOHV4dWtKSkxpTVpPSmVOMUFINjhQL1Y1NDlGNGF6YVJZL0hoYnBBZWU4VndjazN5ZFk1S0NTSlBzdUJISkhuYmIvZUc0MysxVHZ2ampiU0U5QTFGS1RUckJWVWducGRHRnVkK3kyNjN5NDFMa1c3RmNiWFo4bGVmYmZMTmFZdFEwcmdBdFBZVDIwVTI2U3RQMWVwTmtKSldrcSsyYWZtMzN5WUducXd3UGgvMHl5Nk9xSUxWTUlRc08rRm5xZ25SelVENitqcnBHU3ZBdmdFTWZuT1FCQlpPV2JCWjBRQzZUaEs2VUlvRVBvekVhQVI5cGZNTVpGVDkvTDZxcU1XNjFQK3pTN1hxZHJMZTdkWkttUjBpeTFXR1pwSnNEN05JVTErbjJFQlhyY0VoNmpEeTdJTE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tLVk1jMjJWZitWWmtBM1ZaWWR0MXNkZ2dXVHJTa2RCc21saFNnZ0lOdGcvSGhCc0k4ZDlMMjAxTVlVOFRneGVsSnpPOXRVUUh1MDdRWHFaOUd4aTRaRmFqc3U3eC9wM3psK1FqRW5mR2VCY2hHTUlmMXZQYjhoS0pTUTVmYnRhbFRHWlJrV2VLb0dkYWhvRFU5cnNYbnVHbzUrdVZHNUx6aDFERVlyWWNCZForV3BaWkVlYTJ4czNKTnJFcHpPMUl2YW1SRVF4OFl2WFIwZmVvWUs4Nmo5L2JXcWRGbHBkOThhZmUvU0k3ZmIvZmY2L1A5TjBxZ2ZENUwrS3NSTUlJUDB6dWNBd3BpT1JWMTcwZTl1QmZNNHovWVgxN0NuLzhZZFNZT1I0eHFSTmZqZ3Znc3FVVGo4aEhsRnArZi93T08wYVordVE0QUFBPT0ifQ.4h7MKol3jaNyuDU_jOwrSW4FiW-kiGTfnGBjAdbOLJc'
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("DELETE", "https://az4-api.xebo.ai/v3/survey-management/surveys/951381d4-e7d1-4e5a-85f1-be379b18045a/blocks/5da2381b-4cd4-4195-beee-5c4f1369c2c1/questions/99ad333c-1821-478b-b02c-53524150b5e1");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2");
xhr.send();
Responses
{ "message": "Question deleted successfully" }
{
"success": false,
"code": 401,
"status": "Unauthorized",
"error": "AUTHENTICATION_ERROR",
"message": "The authorization token was not provided"
}
{
"success": false,
"code": 500,
"status": "Internal Server Error",
"error": "SERVER_ERROR",
"message": "Error in processing 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.