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.

URL Parameters

community_id
integer
required
The ID of the community

Query Parameters

status
string
Filter by status - draft, published, archived
query
string
Search by title or content
page
number
Page number (default: 1)
per_page
number
Results per page (default: 20)

Returns

Returns a paginated list of community post objects.
curl -X GET https://api.onlydrams.app/odis/v1/communities/1/posts \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -G \
     -d "status=published" \
     -d "page=1"
{
  "count": 45,
  "results": [
    {
      "id": 1,
      "title": "Welcome to the Community!",
      "content": "<p>This is the first post...</p>",
      "status": "published",
      "published_at": "2024-11-01T10:00:00Z",
      "link_url": "https://example.com/article",
      "link_title": "Related Article",
      "link_description": "Check out this article...",
      "visible_to_all_tiers": true,
      "has_poll": true,
      "has_link": true,
      "has_images": true,
      "image_count": 3,
      "image_urls": ["https://storage.googleapis.com/onlydrams/posts/1_img1.jpg"],
      "visible_tier_names": ["All Tiers"],
      "content_preview": "This is the first post...",
      "user": {
        "id": 100,
        "username": "whisky_master"
      },
      "community": {
        "id": 1,
        "name": "Whisky Enthusiasts"
      },
      "poll": {
        "id": 1,
        "question": "What's your favorite whisky type?",
        "multiple_choice": false,
        "expires_at": "2024-11-15T00:00:00Z",
        "total_votes": 42,
        "poll_options": [
          {
            "id": 1,
            "option_text": "Single Malt",
            "position": 1,
            "vote_count": 25
          },
          {
            "id": 2,
            "option_text": "Bourbon",
            "position": 2,
            "vote_count": 17
          }
        ]
      },
      "created_at": "2024-11-01T09:30:00Z",
      "updated_at": "2024-11-01T10:00:00Z"
    }
  ]
}

Notes

  • Authorization: Community owner or admin for full access; members see only posts visible to their tier
  • Search: Searches across post title and content
  • Ordering: Posts ordered by published_at descending