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.
Creates a new community post with optional content, links, images, and polls.
URL Parameters
The unique identifier of the community
Request Body
Post title (max 200 characters)
Post content with HTML formatting (max 10,000 characters)
Link title (max 100 characters)
Link description (max 500 characters)
Post status: draft, published, or archived (default: draft)
Make visible to all tiers (default: true)
Array of tier IDs that can see this post (only if visible_to_all_tiers is false)
Array of base64-encoded images (max 10 images)
Poll configuration object (optional)
Poll Attributes
Poll question (max 500 characters)
poll_attributes.multiple_choice
Allow multiple selections (default: false)
poll_attributes.expires_at
Poll expiration date (ISO 8601 timestamp)
poll_attributes.poll_options_attributes
Array of poll options (2-10 options required)
Returns
Returns the created community post object.
curl -X POST https://api.onlydrams.app/api/v1/communities/abc123-def456/posts \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "New Post Title",
"content": "<p>Post content with HTML formatting...</p>",
"link_url": "https://example.com/related",
"link_title": "Related Content",
"link_description": "Check this out",
"status": "draft",
"visible_to_all_tiers": false,
"visible_tier_ids": ["tier-uuid-1", "tier-uuid-2"],
"images": ["data:image/png;base64,...", "data:image/jpeg;base64,..."],
"poll_attributes": {
"question": "What'\''s your favorite?",
"multiple_choice": false,
"expires_at": "2024-12-01T00:00:00Z",
"poll_options_attributes": [
{
"option_text": "Option 1",
"position": 1
},
{
"option_text": "Option 2",
"position": 2
}
]
}
}'
{
"id": "post-uuid",
"title": "New Post Title",
"content": "<p>Post content with HTML formatting...</p>",
"status": "draft",
"published_at": null,
"link_url": "https://example.com/related",
"link_title": "Related Content",
"link_description": "Check this out",
"post_type": "text",
"has_poll": true,
"has_link": true,
"has_images": true,
"image_urls": [
"https://storage.googleapis.com/onlydrams/posts/post-uuid_img1.jpg",
"https://storage.googleapis.com/onlydrams/posts/post-uuid_img2.jpg"
],
"like_count": 0,
"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": {
"id": 2,
"question": "What's your favorite?",
"multiple_choice": false,
"expires_at": "2024-12-01T00:00:00Z",
"poll_options": [
{
"id": 3,
"option_text": "Option 1",
"position": 1
},
{
"id": 4,
"option_text": "Option 2",
"position": 2
}
]
},
"created_at": "2024-11-14T10:30:00Z",
"updated_at": "2024-11-14T10:30:00Z"
}
Error Responses
Returned when validation fails or image limit is exceeded
{
"errors": ["Images cannot exceed 10 images"]
}
Notes
- Authorization: Community owner or admin only
- Content Requirement: Must have at least one of: content, link_url, or poll
- Poll Validation: Must have 2-10 options; expiration must be in future
- Tier Visibility: Visible tiers must belong to the same community
- Images: Maximum 10 images per post; automatically uploaded to cloud storage
- Status: New posts default to
draft status