internal-billing

Set Workspace Plan From Billing

Set a workspace's entitlement (plan tier + addon quota) from billing.

Idempotent, service-authenticated, internal-only. Sets plan_name; when addons is provided it is applied as a FULL REPLACE (dimensions omitted from the map reset to 0) so a tier change cannot strand a prior tier's addon bonus; omit addons to leave them unchanged. Does not perform destructive downgrade cascades (see module docstring). Returns the full applied addon state.

put/internal/workspaces/{workspace_id}/plan

Request

  • Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
  • URL: https://memory.kagura-ai.com/internal/workspaces/{workspace_id}/plan
  • Auth: none declared

Path parameters

workspace_idstring required

Headers

authorizationstring nullable

Request body

plan_namestring required

Entitlement tier: one of the registered plan keys (free | basic | pro | promax)

statusstring nullable

Billing subscription status (Stripe-agnostic free-form). Billing-owned; accepted for audit/forward-compat, NOT persisted or enforced here.

current_period_endstring date-time nullable

Subscription period end. Billing-owned; accepted for audit, not persisted here.

addonsobject nullable

Absolute addon bonus values keyed by addon dimension (memory, mcp_quota, rest_quota, public_quota, member, context, analysis, storage_mb, sleep_contexts, connector). FULL REPLACE: when provided this is the complete addon state — dimensions omitted from the map are reset to 0 (an empty object zeros all). Omit the field entirely (null) to leave existing addons unchanged (tier-only change).

Response

Successful Response

workspace_idunknown required
plan_nameunknown required
addonsunknown required
entitlement_sourceunknown required
statusunknown
current_period_endunknown
appliedunknown

Changes

No recorded changes to this operation across all 1 revision of this API.