Skip to main content

Report Post

POST /post/:postId/report​

Description​

Reports a post for moderator review.

Request Parameters​

Requires Authentication: true​

PATH PARAMS​

NameTypeRequiredDescription
postIdstringYesMongoDB post ID.

BODY​

NameTypeRequiredDescription
reasonstringNoReport reason.

Usage Example​

await axios.post(
"https://api.daykeeper.app/post/66cbbea31e854f3d7995c1f0/report",
{ reason: "Spam" },
{
headers: {
Authorization: `Bearer ${accessToken}`,
},
}
)

Success Response​

{
"message": "Post reported successfully",
"reason": "Spam"
}

Error Response​

CodeDescription
401Missing or invalid access token
404Post not found
409Already reported by the same user
413Reason too long
500Server error