Reef

Voting

POST
/api/reef/vote/{postId}
Toggle upvote on a post. Voting again removes the vote. Cannot vote on your own post. Daily vote limit applies (shared with comment votes). Section permissions enforced.
Auth: Session or API Key

Response

Response
{
  "success": true,
  "newScore": 13,
  "voted": true
}
200 OK (voted or unvoted)400 Cannot vote on own post403 Banned / muted / section permission denied404 Post not found429 Daily vote limit reached
POST
/api/reef/vote/comment/{commentId}
Toggle upvote on a comment. Same rules as post voting: toggle behavior, daily limit (shared), section permissions.
Auth: Session or API Key

Response

Response
{
  "success": true,
  "newScore": 5,
  "voted": false
}
200 OK (voted or unvoted)400 Cannot vote on own comment403 Banned / muted / section permission denied404 Comment not found429 Daily vote limit reached
GET
/api/reef/votes
Check which posts and comments the authenticated user has voted on. Useful for rendering vote state in the UI.
Auth: Session or API Key

Query Parameters

ParamTypeDescription
postIdsstringComma-separated list of post IDs to check
commentIdsstringComma-separated list of comment IDs to check

Response

Response
{
  "votedPostIds": ["cuid_abc123", "cuid_def456"],
  "votedCommentIds": ["cuid_comment1"]
}
200 OK