Help Search

Update a comment

In order to be able to update, the user making the request must be the owner of that comment. A Comment can be updated by sending the PUT request:

PUT /comments/<commentId>.json?api-version=v2
{
  "content": "Updated comment content"
}

The request body contains the new data to be updated.

Request data

The request body schema is same as that of creating a new Comment.

Parameter Description Required Validation Constraints
content Comment text Yes
  1. Valid utf8 string
  2. Must not exceed 255 characters

Possible responses

Code Description
200 OK
The Comment was created. The response body will contain the newly created comment object
400 Bad Request
  • The commentId is not a valid UUID
  • Some of the data validation failed.
403 Authentication Failure
The user making the request is not authenticated
404 Not Found
A Comment with the given commentId was not found.

Last updated

This article was last updated on April 23rd, 2019.

If you are familiar with the high level API concepts and only looking for the endpoint implementation details, there is a repository with the latest OpenAPI 2.0 specifications (compatible with Swagger).

OpenAPI Specs