---
title: "Delete comment"
method: DELETE
path: "/social-media/comments/{commentId}"
tags: ["📸 Social Media"]
---

# Delete comment

`DELETE /social-media/comments/{commentId}`

## Request

- Base URL: `https://api.freeapi.app/api/v1`
- URL: `https://api.freeapi.app/api/v1/social-media/comments/{commentId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/docs/social-media/comments/:commentId/delete.ts> (a function with typed inputs; its response is checked against the schema)

The API endpoint enables users to delete a specific comment on a post based on the comment ID provided in the path variable.

When accessing this endpoint and specifying the comment ID in the URL, the corresponding comment will be removed from the post.

## Response `200`

Delete comment

- object
  - `data` object
    - `deletedComment` object
      - `__v` number
      - `_id` string
      - `author` string
      - `content` string
      - `createdAt` string
      - `postId` string
      - `updatedAt` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi.md) - [All operations](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) - [OpenAPI document](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/revisions/a9f3a290e4dc?raw)
