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.

Updates an existing community post. Can update content, images, polls, and tier visibility.

URL Parameters

community_id
string
required
The unique identifier of the community
id
string
required
The unique identifier of the post

Request Body

All fields are optional. Only include fields you want to update.
title
string
Post title (max 200 characters)
content
string
Post content with HTML formatting (max 10,000 characters)
External link URL
Link title (max 100 characters)
Link description (max 500 characters)
status
string
Post status: draft, published, or archived
visible_to_all_tiers
boolean
Make visible to all tiers
visible_tier_ids
array
Array of tier IDs that can see this post
images
array
Array of base64-encoded images or existing image URLs (max 10 total)
poll_attributes
object
Poll configuration object

Returns

Returns the updated community post object.
curl -X PATCH https://api.onlydrams.app/api/v1/communities/abc123-def456/posts/post-uuid \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
       "title": "Updated Post Title",
       "content": "<p>Updated content...</p>",
       "status": "published"
     }'
{
  "id": "post-uuid",
  "title": "Updated Post Title",
  "content": "<p>Updated content...</p>",
  "status": "published",
  "published_at": "2024-11-14T10:30:00Z",
  "post_type": "text",
  "has_poll": false,
  "has_link": false,
  "has_images": false,
  "image_urls": [],
  "like_count": 42,
  "liked_by_current_user": false,
  "requires_upgrade": false,
  "scheduled": false,
  "user": {
    "id": "creator-uuid",
    "username": "whisky_master",
    "avatar_url": "https://storage.googleapis.com/onlydrams/avatars/creator.jpg"
  },
  "poll": null,
  "created_at": "2024-11-01T09:30:00Z",
  "updated_at": "2024-11-14T10:30:00Z"
}

Notes

  • Authorization: Community owner or admin only
  • Image Handling:
    • Include existing image URLs in the images array to keep them
    • Add new base64-encoded images to add them
    • Omit images to remove them (if not included, all images are removed)
  • Poll Updates: Updating poll_attributes replaces the entire poll
  • Tier Visibility: Updating visible_tier_ids replaces all tier assignments