TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/pvnm4/Social-Media-Backend/llms.txt
Use this file to discover all available pages before exploring further.
DELETE /posts/{id} endpoint permanently removes a post from the database along with all of its associated votes via cascade deletion. This action is irreversible — once deleted, the post and its vote history cannot be recovered. Only the user who created the post is permitted to delete it; any other authenticated user who attempts to do so will receive a 403 Forbidden response.
Endpoint
Authorization header.
Path Parameters
The unique numeric identifier of the post to delete.
Response
HTTP 204 No Content — The post was successfully deleted. The response body is empty.Error Responses
| Status Code | Description |
|---|---|
401 Unauthorized | No token was provided or the token is invalid/expired. |
403 Forbidden | The authenticated user is not the owner of this post. |
404 Not Found | No post with the specified id exists. Message: "Post with the id:{id} was not found". |