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

# Update Subscription Version

> Update an existing subscription version

Updates an existing subscription version that is in the draft state. Use this endpoint to modify a version before it is published.

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the subscription
</ParamField>

<ParamField path="versionId" type="string" required>
  The unique identifier of the subscription version to update
</ParamField>

## Request

<RequestExample>
  ```json Request theme={null}
  {
    "prices": {
      "existingPriceIds": ["price_0000000000000001"],
      "newPrices": [
        {
          "productId": "prod_0000000000000001",
          "type": "unit",
          "unitAmount": "59.99"
        }
      ]
    },
    "priceBundles": [
      {
        "name": "Core Features",
        "description": "Essential platform capabilities",
        "bundleId": "bun_0000000000000001",
        "existingPriceIds": ["price_0000000000000002"],
        "newPrices": [
          {
            "productId": "prod_0000000000000002",
            "type": "unit",
            "unitAmount": "29.99"
          }
        ]
      }
    ],
    "changeDescription": "Updated pricing for enterprise plan",
    "startDate": "2024-02-01T00:00:00Z",
    "isMidCycle": false
  }
  ```
</RequestExample>

<ParamField body="prices" type="object">
  Details about individual prices to include in this subscription version

  <Expandable title="Prices Object Properties">
    <ParamField body="existingPriceIds" type="array">
      Array of existing price IDs to include in this subscription version
    </ParamField>

    <ParamField body="newPrices" type="array">
      Array of new prices to create and include in this subscription version.
      See the [Pricing Models API
      Reference](/api-reference/subscription-versions/pricingModels) for
      detailed information on all supported pricing models and their parameters.

      <Expandable title="Basic NewPrice Properties">
        <ParamField body="productId" type="string" required>
          The unique identifier of the product for this price
        </ParamField>

        <ParamField body="type" type="string" required>
          The pricing model type (e.g., "unit", "tiered", "volume")
        </ParamField>

        <ParamField body="unitAmount" type="string" required>
          The amount charged per unit for this price. This is a simplified
          parameter - see pricing models reference for complete configuration
          options
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="priceBundles" type="array">
  Array of price bundles to include in this subscription version

  <Expandable title="PriceBundle Properties">
    <ParamField body="name" type="string" required>
      Name of the price bundle
    </ParamField>

    <ParamField body="description" type="string" required>
      Description of the price bundle
    </ParamField>

    <ParamField body="bundleId" type="string" required>
      Unique identifier of the bundle
    </ParamField>

    <ParamField body="existingPriceIds" type="array">
      Array of existing price IDs to include in this bundle
    </ParamField>

    <ParamField body="newPrices" type="array">
      Array of new prices to create and include in this bundle. See the [Pricing
      Models API Reference](/api-reference/subscription-versions/pricingModels)
      for detailed information on all supported pricing models and their
      parameters.

      <Expandable title="Basic NewPrice Properties">
        <ParamField body="productId" type="string" required>
          The unique identifier of the product for this price
        </ParamField>

        <ParamField body="type" type="string" required>
          The pricing model type (e.g., "unit", "tiered", "volume")
        </ParamField>

        <ParamField body="unitAmount" type="string" required>
          The amount charged per unit for this price. This is a simplified
          parameter - see pricing models reference for complete configuration
          options
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="changeDescription" type="string">
  Optional description of what is changing in this version
</ParamField>

<ParamField body="startDate" type="datetime">
  Optional start date for when this version should become active
</ParamField>

<ParamField body="isMidCycle" type="boolean">
  Whether this version change is happening mid-billing cycle
</ParamField>

## Response

<Snippet file="subscription-version-response.mdx" />

<Snippet file="subscription-version-response-fields.mdx" />
