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​
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Comment 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​
| Status | Code | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid authentication token |
| 403 | forbidden | User is not the comment author or admin |
| 404 | not_found | Comment not found |
| 500 | internal_error | Server failed to delete comment |