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.

ENDPOINTS
GET /odis/v1/communities/:community_id/tiers
GET /odis/v1/tiers/:id
POST /odis/v1/communities/:community_id/tiers
PATCH /odis/v1/tiers/:id
DELETE /odis/v1/tiers/:id
POST /odis/v1/tiers/:id/archive
POST /odis/v1/tiers/:id/activate
DELETE /odis/v1/tiers/:id/remove_cover_image
POST /odis/v1/tiers/:id/subscribe

Overview

Membership tiers define subscription levels within a community. Each tier has its own pricing, benefits, and optional member limits. Tiers integrate with Stripe for payment processing.

Authentication

All endpoints require authentication. Authorization levels:
  • Community Owner: Full access to their community’s tiers
  • Admin: Full access to all tiers
  • Authenticated User: Read access to active tiers
Include the authentication token in the header:
Authorization: Bearer YOUR_ACCESS_TOKEN

Membership Tier Object

{
  "id": 1,
  "name": "Bronze Member",
  "description": "Basic access to community content",
  "monthly_price_cents": 999,
  "monthly_price_dollars": 9.99,
  "annual_price_cents": 9990,
  "annual_price_dollars": 99.9,
  "annual_discount_percentage": 17,
  "annual_savings_cents": 2000,
  "annual_savings_dollars": 20.0,
  "currency": "usd",
  "free_trial_enabled": true,
  "free_trial_days": 7,
  "require_shipping_address": false,
  "member_limit": 100,
  "current_member_count": 45,
  "has_available_spots": true,
  "position": 1,
  "status": "active",
  "cover_image_url": "https://storage.googleapis.com/onlydrams/tiers/cover.jpg",
  "stripe_product_id": "prod_xxx",
  "stripe_price_id": "price_xxx",
  "community": {
    "id": 1,
    "name": "Whisky Enthusiasts"
  },
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-11-14T08:20:00Z"
}

Tier Status

  • active - Available for new subscriptions
  • archived - No new subscriptions allowed, existing members maintained

Pricing

Tiers support both monthly and annual billing:
  • Monthly Price: Required, set in dollars or cents
  • Annual Discount: Optional percentage (0-100)
  • Annual Price: Automatically calculated from monthly price and discount

Free Trials

Tiers can offer free trial periods:
  • Enable with free_trial_enabled: true
  • Default trial period: 7 days
  • Customizable trial duration

Member Limits

Optional capacity constraints:
  • Set member_limit to cap membership
  • Track current_member_count
  • has_available_spots indicates availability
  • full flag prevents new subscriptions when limit reached

Stripe Integration

Each tier automatically creates:
  • Stripe Product (represents the tier)
  • Stripe Price (handles recurring billing)
  • Updates sync to Stripe when tier is modified