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.

Cancels the specified subscription. By default, the subscription will remain active until the end of the current billing period.

Path Parameters

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

Body Parameters

immediate
boolean
default:"false"
If true, cancels the subscription immediately. If false (default), the subscription will be canceled at the end of the current billing period.

Returns

Returns a success message.
curl -X POST https://api.onlydrams.app/api/v1/me/subscriptions/abc123-def456/cancel \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "Content-Type: application/json"
{
  "message": "Subscription canceled successfully"
}

Error Responses

StatusDescription
404Subscription not found or doesn’t belong to user
422Subscription is already canceled
422Community Stripe account not connected
422Failed to cancel subscription (Stripe error)

Notes

  • Cancel at Period End: User retains access until current_period_end
  • Cancel Immediately: Access is revoked immediately
  • Reactivation: Subscriptions canceled at period end can potentially be reactivated before the period ends