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.
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": "pln_01HX...",
"active": true
}
}Example prompts
"Publish plan
pln_01HX...."
"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.
Related
How is this guide?