Skip to main content

Documentation Index

Fetch the complete documentation index at: https://api.docs.onlydrams.app/llms.txt

Use this file to discover all available pages before exploring further.

ENDPOINTS
GET /api/v1/communities/:community_id/posts/:post_id/comments
GET /api/v1/comments/:id
POST /api/v1/communities/:community_id/posts/:post_id/comments
PATCH /api/v1/comments/:id
DELETE /api/v1/comments/:id

Overview

Community members can comment on posts they have access to. Comments support text content and are associated with specific community posts. This API is designed for mobile app consumption.

Authentication

Authorization levels:
  • Comment Owner: Can update and delete their own comments
  • Community Owner: Can delete all comments in their community
  • Admin: Can delete all comments
  • Community Member: Can read and create comments on posts they have access to

Comment Object

{
  "id": "comment-uuid",
  "content": "Great post! Thanks for sharing.",
  "like_count": 5,
  "liked_by_current_user": false,
  "user": {
    "id": "user-uuid",
    "username": "whisky_lover",
    "avatar_url": "https://storage.googleapis.com/onlydrams/avatars/user.jpg"
  },
  "created_at": "2024-11-14T10:30:00Z",
  "updated_at": "2024-11-14T10:30:00Z"
}

Access Control

Users must have access to the parent post (based on their tier membership) to:
  • View comments
  • Create comments
  • Interact with comments

Notifications

If the community has notify_new_comments enabled, the community owner receives an email notification when members post comments.