HTTP reference

API — Posts, comments, likes, members, moderation

Route Handlers under src/app/api. Non-public routes expect a Supabase session cookie. Admin routes also require profiles.role = admin.

PublicCallable without a session where the handler allows it.Signed inRequires a signed-in user.AdminAdmin role on your profile.

Back to API overview

MethodsPathAccessSummary
GET, POST/api/community/postsSigned inFeed query (filters, sort) or create a new post.
GET, PATCH, DELETE/api/community/posts/[postId]Signed inRead, edit, or soft-delete a post (author or policy-gated).
GET, POST/api/community/posts/[postId]/commentsSigned inList threaded comments or add a comment/reply.
POST/api/community/posts/[postId]/likeSigned inToggle or set like state for the current user.
POST/api/community/posts/[postId]/reportSigned inSubmit a moderation report for a post.
POST/api/community/posts/[postId]/moderateSigned inModerator action on a post (hide/unhide).Requires moderator capability in app policy.
POST/api/community/posts/[postId]/comments/[commentId]/moderateSigned inModerator action on a single comment.
GET/api/community/members/[userId]Signed inPublic-safe member card plus optional extended pregnancy fields when allowed.