> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish Plan

Publishes a draft plan, making it available for new subscriptions.

## Mutation

<CodeGroup>
  ```graphql Mutation theme={null}
  mutation PublishPlan($input: PackagePublishInput!) {
    publishPlan(input: $input) {
      taskId
    }
  }
  ```

  ```json Variables theme={null}
  {
    "input": {
      "id": "plan-uuid-123",
      "migrationType": "NEW_CUSTOMERS"
    }
  }
  ```

  ```json Response theme={null}
  {
    "data": {
      "publishPlan": {
        "taskId": "task-456"
      }
    }
  }
  ```
</CodeGroup>

## Parameters

<ParamField body="input" type="PackagePublishInput" required>
  Input for publishing a plan

  <Expandable title="properties">
    <ParamField body="id" type="UUID" required>
      Plan internal ID (not refId)
    </ParamField>

    <ParamField body="migrationType" type="PublishMigrationType">
      `NEW_CUSTOMERS` - Only new subscriptions use this version
      `ALL_CUSTOMERS` - Migrate existing subscriptions to this version
    </ParamField>

    <ParamField body="environmentId" type="UUID">
      Environment ID
    </ParamField>
  </Expandable>
</ParamField>

## Migration Types

| Type            | Description                                |
| --------------- | ------------------------------------------ |
| `NEW_CUSTOMERS` | Only new subscriptions get the new version |
| `ALL_CUSTOMERS` | Existing subscriptions are migrated        |

## Return Type

Returns a `PublishPackageResult` with a `taskId` for tracking the publish operation.

## Related Operations

* [Create Plan](/api-and-sdks/api-reference/mutations/create-plan) - Create draft plan
* [List Plans](/api-and-sdks/api-reference/queries/list-plans) - Query plans
