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.

Adds a new comment to a community post.

URL Parameters

community_id
integer
required
The ID of the community
community_post_id
integer
required
The ID of the community post

Request Body

comment.content
string
required
The comment text

Returns

Returns the created comment object.
curl -X POST https://api.onlydrams.app/odis/v1/communities/1/posts/2/comments \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
       "comment": {
         "content": "This is my comment on the post."
       }
     }'
{
  "id": 3,
  "content": "This is my comment on the post.",
  "user": {
    "id": 200,
    "username": "whisky_lover",
    "avatar_url": "https://storage.googleapis.com/onlydrams/avatars/200.jpg"
  },
  "created_at": "2024-11-14T12:00:00Z",
  "updated_at": "2024-11-14T12:00:00Z"
}

Error Responses

{
  "message": "You don't have access to this post"
}
{
  "message": ["Content can't be blank"]
}

Notes

  • Authorization: User must have access to the post (based on tier membership)
  • Notification: If community has notify_new_comments enabled, owner receives email
  • Content: Comment content is required
  • Author: Automatically set to current user