Skip to main content

PUT /api/v1/comments/{id}

Updates the text of an existing comment. Only the comment author can update it.

Authentication​

Required. Bearer token in Authorization header.

Request​

Path Parameters​

ParameterTypeRequiredDescription
idintegerYesComment ID

Body Parameters​

ParameterTypeRequiredDescription
contentstringYesUpdated comment text

Example​

curl -X PUT https://intotes.com/api/v1/comments/1 \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"content": "Updated: I changed my mind, leaning NO now."
}'

Response​

200 OK​

{
"message": "comment updated successfully"
}

Errors​

StatusCodeDescription
400bad_requestMissing or invalid text field
401unauthorizedMissing or invalid authentication token
403forbiddenUser is not the comment author
404not_foundComment not found
500internal_errorServer failed to update comment