publish_plan
Publish or unpublish a subscription plan by flipping its active flag. Emits plan.activated or plan.deactivated.
Purpose
Toggle a plan's active flag. Active plans are purchasable and listed on the portal; inactive plans stay on the books but hide from new buyers. Noop when the plan is already in the requested state.
Free plans can only be published on a paid plan
A plan priced at 0 can only be sold on the Starter and Growth plans. On the
Free plan the call is refused with TEAM_TIER_REQUIRED and the plan stays off
sale — give it a price first, or upgrade the creator.
Unpublishing is always allowed whatever the price, so a plan can always be wound down.
Required ability
project-subscription-plan:update
Input schema
{
"type": "object",
"required": ["plan_id"],
"properties": {
"plan_id": {
"type": "string",
"description": "UUID of the plan to flip."
},
"active": {
"type": "boolean",
"description": "Target state — true publishes, false unpublishes. Defaults to true."
}
}
}Output shape
{
"data": {
"id": "c4e82f16-93a7-4d5b-b81c-6e0f27a94d3b",
"active": true
}
}Example prompts
"Publish plan
c4e82f16-93a7-4d5b-b81c-6e0f27a94d3b."
"Unpublish the Beta Early-Bird plan."
Failure modes
RESOURCE_NOT_FOUND— unknownplan_id, or the plan belongs to a team outside the token's scope.TOKEN_MISSING_ABILITY— token lacksproject-subscription-plan:update.TEAM_TIER_REQUIRED—active=trueon a plan priced at0while the creator is on the Free plan.error.context.reasoncarries the remedy: price the plan, or upgrade the creator to Starter or Growth.
Related
How is this guide?