Update an Answer

You can use this API request to update or edit an answer to a previously posted question.

/services/v2/answer/[answerId].json

You can use the following parameters in your update an answer request:

Body: you can use any field of the body parameter.
Other options: wrap.

🚧

Permissions & Notes:

  • You must have the Edit any answer permission.
    • If the answer is your own, you must have the Edit own answer permission.
  • You can specify the data describing the answer you are posting, both in the body of the request, or as request parameter, with the same names as the fields in the body.
    • When you send data in the body of the request, the format should match the URL extension, or the value of the site's HTTP request header content-type.
    • If you specify data values for the same field, both on the request body and as request or query parameters, the value of the parameters takes precedence over the value in the body.
  • We added this request in version 1.6.3.

Sample Request

A PUT update an answer request to update an answer (answerId: 799) to say "The details really helped." sent to https://apidocs.cloud.answerhub.com using a base64 encoded authorization, would look like this:

curl 
-H "Authorization: Basic YW5zd2VyaHViOmFuc3dlcmh1Yg==" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT 
-d '{"body":"The details really helped."}' "https://apidocs.cloud.answerhub.com/services/v2/answer/799.json" -v

Expected Response

If your request was successfully fulfilled, you should see a 204 - No Content HTTP status.

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!