Post a Reply to an Idea

You can use this request to post a reply to an idea on your AnswerHub site.

/services/v2/node/[ideaId]/comment.json

You can use the following parameters in your post reply to an idea request:

Other options: wrap, v1

🚧

Permissions & Notes:

  • You must have the Submit idea comment permission under Custom Roles in the Advanced Editor.

  • You must also have the Publish idea comment permission under Custom Roles in the Advanced Editor if you want the comment to automatically publish.

  • You can specify the data describing the reply you are posting, in the body of the request.

    • 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 a request or query parameter, the value of the parameters takes precedence over the value in the body.
  • We added this request in version 1.6.3.6.

Sample Request

A POST post reply to an idea request to post a reply ("Body of your comment as a response to an idea") for an idea (ideaId: 857) sent to https://apidocs.cloud.answerhub.com using a human-readable username and password (admin/test123), would look like this:

curl 
-H "admin:test123" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X POST 
-d '{"body":"Body of your comment as a response to an idea"}' "https://apidocs.cloud.answerhub.com/services/v2/idea/857/comment.json" -v

Expected Response

Successful Response:

  • HTTP Status 201 - Created
{
    "id": "858",
    "type": "ideacomment",
    "creationDate": 1550516867160,
    "creationDateFormatted": "02/18/2019 07:07 PM",
    "body": "<div class=\"fr-view clearfix\">Body of your comment as a response to an idea</div>",
    "bodyAsHTML": "<div class=\"fr-view clearfix\">Body of your comment as a response to an idea</div>",
    "author": {
        "id": 108,
        "username": "admin",
        "realname": null,
        "avatar": "https://secure.gravatar.com/avatar/4e955c70eeff0abe1974c9be300a8887?d=identicon&r=PG",
        "reputation": 91
    },
    "lastEditedAction": 1143,
    "activeRevisionId": 870,
    "revisionIds": [
        870
    ],
    "lastActiveUserId": 108,
    "lastActiveDate": 1550516867160,
    "parentId": 857,
    "parentAuthor": {
        "username": "dzone",
        "realname": null
    },
    "originalParentId": 857,
    "childrenIds": [],
    "commentIds": [],
    "marked": false,
    "topics": [],
    "containerIds": [],
    "plug": null,
    "wiki": false,
    "score": 0,
    "depth": 0,
    "reportCount": 0
}

Community User Interface Result

You will see a comment added to the idea with the information you provided

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