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 a membership tier. Changes are automatically synced to Stripe.

URL Parameters

id
integer
required
The ID of the membership tier

Request Body

name
string
Tier name (max 100 characters)
description
string
Tier description (max 5000 characters)
monthly_price_dollars
number
Monthly subscription price in dollars
free_trial_days
integer
Number of free trial days
member_limit
integer
Maximum number of members allowed
position
integer
Sort order for displaying tiers
annual_discount_percentage
integer
Discount percentage for annual billing (0-100)
cover_image
string
Base64-encoded cover image

Returns

Returns the updated membership tier object.
curl -X PATCH https://api.onlydrams.app/odis/v1/tiers/2 \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
       "name": "Gold Member Premium",
       "description": "Updated description with more benefits",
       "monthly_price_dollars": 24.99,
       "member_limit": 75
     }'
{
  "id": 2,
  "name": "Gold Member Premium",
  "description": "Updated description with more benefits",
  "monthly_price_cents": 2499,
  "monthly_price_dollars": 24.99,
  "annual_price_cents": 23990,
  "annual_price_dollars": 239.9,
  "annual_discount_percentage": 20,
  "annual_savings_cents": 5998,
  "annual_savings_dollars": 59.98,
  "currency": "usd",
  "free_trial_enabled": true,
  "free_trial_days": 7,
  "require_shipping_address": true,
  "member_limit": 75,
  "current_member_count": 30,
  "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-14T11:45:00Z"
}

Notes

  • Authorization: Community owner or admin only
  • Stripe Sync: Updates are automatically synced to Stripe Product
  • Price Changes: Changing price creates a new Stripe Price object
  • Existing Members: Price changes don’t affect existing subscriptions