Перейти к основному содержимому

DELETE /api/v1/comments/{id}

Deletes a comment. Only the comment author or an admin can delete it.

Authentication

Required. Bearer token in Authorization header.

Request

Path Parameters

ParameterTypeRequiredDescription
idintegerYesComment ID

Example

curl -X DELETE https://intotes.com/api/v1/comments/1 \
-H "Authorization: Bearer <access_token>"

Response

200 OK

{
"message": "comment deleted successfully"
}

Errors

StatusCodeDescription
401unauthorizedMissing or invalid authentication token
403forbiddenUser is not the comment author or admin
404not_foundComment not found
500internal_errorServer failed to delete comment