> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quader864.ir/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete post

> Delete a blog post

<Note>
  This endpoint requires authentication. Only the author or an admin can delete a post.
</Note>

## Path parameters

<ParamField path="id" type="string" required>
  The post ID
</ParamField>

## Response

<ResponseField name="message" type="string">
  Deletion confirmation message
</ResponseField>

<Note>
  * **Draft/pending posts**: Permanently deleted
  * **Public posts by author**: Soft deleted (marked as "deleted")
  * **Any post by admin**: Permanently deleted
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api-verifier-2.onrender.com/api/blog/65a1b2c3d4e5f6g7h8i9j0k1 \
    -H "Authorization: Bearer <your-token>"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Post deleted successfully"
  }
  ```

  ```json 403 theme={null}
  {
    "error": "Forbidden"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Post not found"
  }
  ```
</ResponseExample>
