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.

Changes the subscription to a different membership tier within the same community. This handles both upgrades (higher price) and downgrades (lower price).

Path Parameters

id
string
required
The ID of the subscription (CommunityMembership) to change

Body Parameters

tier_id
string
required
The ID of the new membership tier to switch to

Returns

Returns a success message with the new tier name.
curl -X POST https://api.onlydrams.app/api/v1/me/subscriptions/abc123-def456/change \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"tier_id": "xyz789-ghi012"}'
{
  "message": "Successfully changed to Premium Member"
}

Error Responses

StatusDescription
404Subscription not found or doesn’t belong to user
404Tier not found
422Already subscribed to this tier
422Cannot upgrade to a tier in a different community
422Tier is not available for subscription (archived)
422Tier is at capacity
422Current membership must be active or trialing to upgrade
422Failed to change tier (Stripe error)

Notes

  • Proration: When upgrading, the user is charged the prorated difference immediately
  • Downgrades: Take effect at the next billing cycle
  • Same Community Only: Can only change to tiers within the same community
  • Active Tiers Only: Target tier must be active (not archived)
  • Capacity Check: Target tier must have available spots if it has a member limit