Accept a Node

You can use this API request to accept an answer to a question node.

/services/v2/node/[nodeId]/accept.json

You can use the following parameters in your accept a node request:

Other options: wrap

🚧

Permissions & Notes:

  • You must have the Accept any answer permission under Moderation Roles in the Advanced Editor to accept any answer.

    • If the answer is your own, you must have the Accept an answer on own questions permission under Standard Roles in the Advanced Editor or the Accept own answer permission under Moderation Roles in the Advanced Editor.
  • You can find the answer's nodeId in the edit answer URL after /answers/. For example: https://apidocs.cloud.answerhub.com/qa/answers/17/edit.html (The answer's nodeId in this example is 17).

  • We added this request in version 1.6.3.

Sample Request

A PUT accept a node request to accept a node (nodeId: 807) sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/test123) would look like this:

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/node/807/accept.json"

Expected Response

Successful Response:

  • HTTP Status 200 - OK
{
    "success": true,
    "result": {
        "acceptAction": {
            "id": 1055,
            "ip": "172.18.0.3",
            "user": {
                "id": 108,
                "username": "admin",
                "avatarUrl": "https://secure.gravatar.com/avatar/4e955c70eeff0abe1974c9be300a8887?d=identicon&r=PG"
            },
            "actionDate": "Tue Feb 05 14:39:30 UTC 2019",
            "canceled": false,
            "extra": null,
            "private": false,
            "verb": "accepted",
            "node": {
                "id": 807,
                "type": "answer"
            }
        }
    }
}
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!