Skip to content

PUT/comments/{id}

Replace comment

Full replacement. All mutable fields overwritten. Triggers `comments.updated` webhook.

Parameters 1

NameTypeDescription
idrequiredpath · integerResource identifier

ReturnsComment

AcceptsCommentInput

Bearer token required

Response examples

200Comment replaced

application/json example derived from schema

{
  "id": 1,
  "postId": 1,
  "userId": 1,
  "body": "How does this compare to the approach described in the official docs?",
  "likes": 16,
  "createdAt": "2023-04-28T06:59:47.906Z"
}
400400 — invalid input or malformed JSON

application/json

{
  "error": {
    "status": 400,
    "message": "Request body required"
  }
}
404404 — resource not found

application/json

{
  "error": {
    "status": 404,
    "message": "users #999 not found"
  }
}

Released under the MIT License.