Change the subscription plan (tier switch with proration)
Switches the workspace to the requested plan with mid-period proration applied atomically. The response envelope includes:
subscription: the updated row.proration: refund of unused old-tier base + prorated new-tier base, net of both. Positivenet_minor= debit; negative = credit. Charges recorded in the recurring_charges ledger.quota_after: absolute voice/SMS/WhatsApp remaining counts AFTER carryover. Unused quota from the old tier is preserved and added to the new tier’s included quantities.
Errors:
400 NO_OPif already on that plan.400 TIER_SWITCH_UNSUPPORTEDon PAYG workspaces.402 INSUFFICIENT_BALANCEif the upgrade’s net charge exceeds the workspace balance; customer must top up first.404 NO_ACTIVE_SUBSCRIPTIONwhen nothing to switch.
Retries are idempotent: a client that sends the same PATCH
twice (e.g. after a network timeout) will not be double-billed.
The second call either returns NO_OP (if the first apply
completed) or replays the first call’s response (if the client
retried while the first was in flight).
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
plan
Target plan. Must differ from the current plan.
Allowed values:
Response
Subscription updated with proration
subscription
proration
quota_after
Errors
400
Update Subscription Request Bad Request Error
401
Update Subscription Request Unauthorized Error
402
Update Subscription Request Payment Required Error
404
Update Subscription Request Not Found Error
500
Update Subscription Request Internal Server Error
503
Update Subscription Request Service Unavailable Error