v51

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-01140309549.5 KB
organizations
plan

Update an organization's metered subscription plan.

Schedules or clears a cancel-at-period-end for the organization's metered subscription. Available to organization managers and must be called with a user session JWT, not a user API key.

patch/v0/organizations/{organization}/plan

Path parameters

organizationstring required

The slug or UUID for an organization.

Request body

cancel_at_period_endboolean required

Update the subscription's scheduled cancellation. Set to false to resume a plan scheduled to cancel at period end, or true to schedule it to cancel at the end of the current period. Only applies to metered subscriptions, not licensed (Self-Hosted) plans.

Response

successful operation

cancel_at_period_endboolean required

Whether the subscription is set to cancel at the end of the current period (the org keeps access until current_period_end, then downgrades to Free).

createdstring date-time required
current_period_endstring date-time required
current_period_startstring date-time required
level'free' | 'pro' | 'team' | 'enterprise' required
organizationstring uuid required
status'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'paused' | 'trialing' | 'unpaid' required
unit_amountinteger required