---
title: "Delete a comment"
method: DELETE
path: "/posts/{postId}/comments/{commentId}"
tags: ["Comments"]
---

# Delete a comment

`DELETE /posts/{postId}/comments/{commentId}`

Delete a comment if necessary

## Path parameters

- `postId` string, uuid, required
- `commentId` string, uuid, required

## Response `204`

Comment deleted successfully

## Other responses

- `404` — Resource not found
- `500` — Internal server error

## Changes

- **2026-07-17** `41c89b420e85` — 4 breaking
  - added the new path request parameter `commentId`
  - added the new path request parameter `postId`
  - the `details` response's property type changed from `object` to `array` for status `404`
  - the `details` response's property type changed from `object` to `array` for status `500`
- **2025-05-30** `2775bd09f55e` — 2 warning, 4 info
  - deleted the `path` request parameter `commentId`
  - deleted the `path` request parameter `postId`
  - added the optional property `details` to the response with the `404` status
  - added the optional property `details` to the response with the `500` status
  - …2 more
- **2025-05-30** `dbaf42ae4311` — 4 breaking, 2 warning
  - for the `path` request parameter `commentId`, the type changed from `string` to `integer`, and format from `uuid` to no format
  - for the `path` request parameter `postId`, the type changed from `string` to `integer`, and format from `uuid` to no format
  - removed the required property `error` from the response with the `404` status
  - removed the required property `error` from the response with the `500` status
  - …2 more

[Change history](https://skmtc.dev/azure/apis/simple-social-media-api/changes/posts/:postId/comments/:commentId/delete.md)

---

[API](https://skmtc.dev/azure/apis/simple-social-media-api.md) · [All operations](https://skmtc.dev/azure/apis/simple-social-media-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/simple-social-media-api/revisions/41c89b420e85/schema)
