Gigya Job Openings

comments.updateComment REST

Skip to end of metadata
Go to start of metadata


This method allows moderators to update an existing comment. 


Note: This method is available to moderators only, unless user editing is enabled. When user editing is enabled, whether through the comments.setCategoryInfo API method or via the Comments Settings in the console, users can edit the following fields: commentText, commentTitle, mediaItems, ratings and taggedUsers.


Request URL

Where <Data_Center> is:
  • - For the US data center.
  • - For the European data center.
  • - For the Australian data center.
  • - For the Russian data center.
  • - For the Chinese data center.

If you are not sure of your site's data center, see Finding Your Data Center.


categoryIDstringThe identifier of the comments category to which you would like to update the comment.
streamIDstringThe identifier of the comments stream to which you would like to update the comment. 
commentIDstringThe identifier of the comment you would like to update.
commentTextstringChange the comment text to this string.
commentTitlestringChange the comment title to this string.
statusstringChange the comment status: pending/rejected/approved
flagCountintegerChange the flag count of the comment. Supports absolute values as well as "+" and "-" to increment or decrement the count. "0"(zero) will be used to clear flags.
noteobjectThe note is a custom object, which may include additional information about the reason for the update and who performed it.
addHighlightGroupsarray of stringsAn array of group names to add to the highlightGroups field of the comment object. If the name already exists, it will not be added.
deleteHighlightGroupsarray of stringsAn array of group names to delete from the highlightGroups field of the  comment object .
ratingsJSON objectAn object that redefines user ratings for this stream. 
The object structure is: {'_overall': ratingValue}, where the ratingValue is an integer between 1-5.
Old values are overwritten by the new  ones. To reset a dimension's value, pass a null value to that dimension.
mediaItemsarrayAn array of URLs of media items to attach to the comment. Currently media items are limited to 3 per comment. If the number of media items exceeds this limit, only the first 3 will be posted. This parameter is only accepted if  clientSettings.enableMediaItems  is set to true for the category via comments.setCategoryInfo.
taggedUsersarrayAn array of users (UIDs) tagged in the comment body. The taggedUsers array replaces the users that are tagged in the comment. The comment body should have special markup elements that refer to the index of the tagged user in the array. Nulls are allowed members of the array.

Currently tagged users are limited to 10 per comment. If the number of tagged users exceeds this limit, only the first 10 will be posted. This parameter is only accepted if clientSettings.enableUserTagging is set to true for the category via comments.setCategoryInfo.

senderJSON object

An object that can change the following values for the comment: name, photoURL, profileURL. The URLs should be publicly accessible.

This may be used, for example, when migrating to a different database, and the URLs of user info have changed. Note that the change is per comment - changing the photo URL for a sender in one comment, for example, won't change the photo URL of that sender in a different comment.

Authorization Parameters

Each REST API request must contain identification and authorization parameters.

Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as client-side calls and all client-side rate limits will apply. In order to not reach client-side IP rate limits that may impact your implementation when using server-to-server REST calls, it is Recommended Best Practice to always sign the request or use a secret. A non-exhaustive list of REST APIs that this may apply to are as follows:

  • accounts.login
  • socialize.login
  • accounts.notifyLogin
  • socialize.notifyLogin
  • accounts.finalizeRegistration
  • accounts.linkAccounts

Please refer to the Authorization Parameters section for details. 

Sample Requests


Response Data

errorCode integer The result code of the operation. Code '0' indicates success, any other number indicates failure. For a complete list of error codes, see the Error Codes table.
errorMessage string A short textual description of an error, associated with the errorCode, for logging purposes. This field will appear in the response only in case of an error.
errorDetails string This field will appear in the response only in case of an error and will contain the exception info, if available.
fullEventName string The full name of the event that triggered the response. This is an internally used parameter that is not always returned and should not be relied upon by your implementation.
callId string Unique identifier of the transaction, for debugging purposes.
time string The time of the response represented in ISO 8601 format, i.e., yyyy-mm-dd-Thh:MM:ss.SSSZ or
statusCode integer The HTTP response code of the operation. Code '200' indicates success.
This property is deprecated and only returned for backward compatibility.
statusReason string A brief explanation of the status code.
This property is deprecated and only returned for backward compatibility.


commentComment objectThe updated comment.


A field that does not contain data will not appear in the response.


Response Example

"comment": {
    "ID": "c50379017b4749b88ed82ac2eb096cc3",
    "streamId": "eyal",
    "tags": [],
    "threadID": "",
    "isModerator": false,
    "commentText": "Post comment1",
    "posVotes": 0,
    "TotalVotes": 0,
    "sender": {
        "name": "Dani",
        "loginProvider": "Site",
        "isSelf": false
    "flagCount": 0,
    "moderatorEdit": false,
    "timestamp": 1421132632176,
    "threadTimestamp": 1421132632176,
    "status": "published",
    "mediaItems": [],
    "highlightGroups": [
    "edited": false
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "7a4fd32fac384dfa959fa19271de262a",
"time": "2015-01-13T07:03:54.605Z"