DELETE: https://{{env}}.survey2connect.com/v2/api/surveys/{{survey_id}}/pages/{{page_id}}/questions/{{question_id}}

The value of environment {{env}} variable depends upon your datacenter. Refer to the Environment page for more details.

"Content-Type": "application/json"
type: Api Key  
Key: x-api-key 
token: value from portal 

Path Parameter

{{survey_id}}: Unique Survey ID.

{{page_id}}: Unique Page ID.

{{question_id}}: Unique Question ID.

Request Sample

curl --location --request DELETE 'https://az1.survey2connect.com/v2/api/surveys/survey_id/pages/page_id/questions/question_id' \ 

--header 'Authorization: Bearer eyJraWQiOiJzM3E1OWF2cFdIcXVKa0I0MjRpcFpqQVN0dXAzQzFkZEhVM3k2TjNZSXRjPSIsImFs' \ 

--header 'Content-Type: application/json' \    
var myHeaders = new Headers(); 
myHeaders.append("Authorization", "Bearer eyJraWQiOiJzM3E1OWF2cFdIcXVKa0I0MjRpcFpqQVN0dXAzQzFkZEhVM3k2TjNZSXRjPSIsImFs”); 
myHeaders.append("Content-Type", "application/json"); 
    
var requestOptions = { 
  method: DELETE, 
  headers: myHeaders, 
  redirect: 'follow' 
}; 
  
fetch("https://az1.survey2connect.com/v2/api/surveys/survey_id/pages/page_id/questions/question_id", requestOptions) 
  .then(response => response.text()) 
  .then(result => console.log(result)) 
  .catch(error => console.log('error', error));   

Responses

{ 
    "msg": "question is deleted successfully", 
}    
{ 
    "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.

Get Question

GET : https://{{env}}.survey2connect.com/v2/api/surveys/{{survey_id}}/pages/{{page_id}}/questions/{{question_id}} The value of environment {{env}} variable depends upon your datacenter. Refer to the Environment page for more…

Create Question

POST: https://{{env}}.survey2connect.com/v2/api/surveys/{{survey_id}}/pages/{{page_id}}/questions The value of environment {{env}} variable depends upon your datacenter. Refer to the Environment page for more details.…

Update Question

PUT: https://{{env}}.survey2connect.com/v2/api/surveys/{{survey_id}}/pages/{{page_id}}/questions/{{question_id}} The value of environment {{env}} variable depends upon your datacenter. Refer to the Environment page for more details.…

Ask a human

Can't Find What You're Looking For?