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 membership tier and automatically sets up the associated Stripe Product and Price.
URL Parameters
Request Body
Tier name (max 100 characters)
Tier description explaining benefits (max 5000 characters)
Monthly subscription price in dollars (e.g., 9.99)
Currency code (default: “usd”)
Enable free trial period (default: false)
Number of free trial days (default: 7 if enabled)
Require members to provide shipping address (default: false)
Maximum number of members allowed (optional, null for unlimited)
Sort order for displaying tiers (optional)
annual_discount_percentage
Discount percentage for annual billing, 0-100 (optional)
Base64-encoded cover image (optional)
Returns
Returns the created membership tier object.
curl -X POST https://api.onlydrams.app/odis/v1/communities/1/tiers \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Gold Member",
"description": "Premium access with exclusive content",
"monthly_price_dollars": 19.99,
"currency": "usd",
"free_trial_enabled": true,
"free_trial_days": 7,
"require_shipping_address": true,
"member_limit": 50,
"position": 2,
"annual_discount_percentage": 20,
"cover_image": "data:image/png;base64,iVBORw0KGgo..."
}'
{
"id": 2,
"name": "Gold Member",
"description": "Premium access with exclusive content",
"monthly_price_cents": 1999,
"monthly_price_dollars": 19.99,
"annual_price_cents": 19190,
"annual_price_dollars": 191.9,
"annual_discount_percentage": 20,
"annual_savings_cents": 4798,
"annual_savings_dollars": 47.98,
"currency": "usd",
"free_trial_enabled": true,
"free_trial_days": 7,
"require_shipping_address": true,
"member_limit": 50,
"current_member_count": 0,
"has_available_spots": true,
"position": 2,
"status": "active",
"cover_image_url": "https://storage.googleapis.com/onlydrams/tiers/gold.jpg",
"stripe_product_id": "prod_yyy",
"stripe_price_id": "price_yyy",
"community": {
"id": 1,
"name": "Whisky Enthusiasts"
},
"created_at": "2024-11-14T10:30:00Z",
"updated_at": "2024-11-14T10:30:00Z"
}
Notes
- Authorization: Community owner or admin only
- Stripe Integration: Automatically creates Stripe Product and Price objects
- Pricing: Monthly price must be greater than 0
- Annual Billing: If
annual_discount_percentage is provided, annual pricing is automatically calculated
- Member Limit: Must be greater than 0 if provided
- Status: New tiers are created with
active status