Skip to main content

Delete Post

DELETE /post/:postId​

Description​

Soft-deletes a post owned by the authenticated user and triggers cleanup for likes, comments, reports, and media links.

Request Parameters​

Requires Authentication: true​

PATH PARAMS​

NameTypeRequiredDescription
postIdstringYesMongoDB post ID.

Usage Example​

await axios.delete("https://api.daykeeper.app/post/66ca560de464036ce909f08a", {
headers: {
Authorization: `Bearer ${accessToken}`,
},
})

Success Response​

{
"message": "Post deleted successfully"
}

Error Response​

CodeDescription
401Missing or invalid access token
401Invalid post ID
404Post not found or not owned by the user
500Server error