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

# Update plan provision

> Update a plan provision with new specifications, variables, and metadata. Validates provision data and updates the provision record.



## OpenAPI

````yaml /api-reference/cx/swagger.json patch /packages/retirement/plans/{plan}/{year}
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /packages/retirement/plans/{plan}/{year}:
    patch:
      tags:
        - packages
      summary: Update plan provision
      description: >-
        Update a plan provision with new specifications, variables, and
        metadata. Validates provision data and updates the provision record.
      parameters:
        - description: Plan ID
          name: plan
          in: path
          required: true
          schema:
            type: string
        - description: Provision year
          name: year
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
        description: Provision update data (_id required)
        required: true
      responses:
        '200':
          description: Update result
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_packages_retirement_plans_provisions.UpdatePlanProvisionResponse
        '400':
          description: Bad request - invalid plan ID, year, provision ID, or request body
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '404':
          description: Provision not found
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_packages_retirement_plans_provisions.UpdatePlanProvisionResponse:
      type: object
      properties:
        ok:
          type: boolean
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.