Delete a Survey using its ID from a Post

Use the survey ID to delete the survey from a post.

services/v2/node/{node_id}/survey/{survey_id}.json

🚧

Permissions & Notes:

There is no permission required to make this API request.

Sample Request

In the sample request below, the user is making a request to delete a survey with an ID of 321 on question post with a node ID of 123.

curl 
-u answerhub:test123 
-H "Accept:application/json"
-H "Content-Type:applcation/json" 
-X DELETE "https://apidocs.cloud.answerhub.com/services/v2/node/123/survey/321.json"

Successful Response

HTTP Status 200. No JSON response will appear.

Expected Error Response

There are 3 different error responses. Each one of them displays in a different tab below. They all have the HTTP status 400.

400: {“error”:”The selected Survey is not assigned to this node.”}
400: {“error”:”The Survey has already ended.”}
400: {“error”:”The Survey has votes.”}
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!