---
title: "Update Data Plan Version"
method: PATCH
path: "/{plan_id}/versions/{plan_version}"
tags: ["Data Plan Version"]
---

# Update Data Plan Version

`PATCH /{plan_id}/versions/{plan_version}`

## Request

- Base URL: `https://api.mparticle.com/platform/v2/workspaces/0/plans`
- URL: `https://api.mparticle.com/platform/v2/workspaces/0/plans/{plan_id}/versions/{plan_version}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/mparticle/apis/mparticle-data-planning-api/docs/:plan_id/versions/:plan_version/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update a plan version

## Path parameters

- `plan_id` string, required
- `plan_version` integer, required

## Request body

- object
  - `activated_environment` 'none' | 'development' | 'production': Data plan can be active in development, production & development (production), or neither. 'none' indicates it's inactive.
  - `version_description` string
  - `version_document` VersionDocument: This is the actual data plan, since a data plan can have many versions.
    - `data_points` DataPoint[]
      - `description` string
      - `match` DataPointMatch, required
        - `type` 'unknown' | 'screen_view' | 'custom_event' | 'user_attributes' | 'user_identities' | 'product_action' | 'promotion_action' | 'product_impression', required
        - `criteria` union, required
          - ScreenViewEventCriteria
            - `screen_name` string, required
          - CustomEventCriteria
            - `event_name` string, required
            - `custom_event_type` 'unknown' | 'navigation' | 'location' | 'search' | 'transaction' | 'user_content' | 'user_preference' | 'social' | 'other' | 'media', required
          - UserAttributeCriteria
          - CommerceActionEventCriteria: Data point match criteria object for commerce action events
            - `action` union
              - …
      - `validator` DataPointValidator, required
        - `type` 'json_schema', required
        - `definition` object, required: This should be a valid JSON schema
    - `active_transformation_ids` number[]
    - `transformations` DataPlanTransformation
      - `transformation_id` number
      - `transformation_name` string
      - `error_pointer` string
      - `validation_error_types` string[]
      - `schema_keywords` SchemaKeyword[]
      - `json_patch` DataPlanPatch[]
        - `op` 'unknown' | 'add' | 'remove' | 'replace' | 'copy' | 'move' | 'test'
        - `from` string
        - `path` string
        - `value` string
      - `description` string
  - `quarantine_feed_id` number

## Response `200`

Data plan version

- DataPlanVersion
  - `version` integer
  - `version_description` string
  - `created_on` string, date-time
  - `created_by` string
  - `last_modified_on` string, date-time
  - `last_modified_by` string
  - `version_document` VersionDocument: This is the actual data plan, since a data plan can have many versions.
    - `data_points` DataPoint[]
      - `description` string
      - `match` DataPointMatch, required
        - `type` 'unknown' | 'screen_view' | 'custom_event' | 'user_attributes' | 'user_identities' | 'product_action' | 'promotion_action' | 'product_impression', required
        - `criteria` union, required
          - ScreenViewEventCriteria
            - `screen_name` string, required
          - CustomEventCriteria
            - `event_name` string, required
            - `custom_event_type` 'unknown' | 'navigation' | 'location' | 'search' | 'transaction' | 'user_content' | 'user_preference' | 'social' | 'other' | 'media', required
          - UserAttributeCriteria
          - CommerceActionEventCriteria: Data point match criteria object for commerce action events
            - `action` union
              - …
      - `validator` DataPointValidator, required
        - `type` 'json_schema', required
        - `definition` object, required: This should be a valid JSON schema
    - `active_transformation_ids` number[]
    - `transformations` DataPlanTransformation
      - `transformation_id` number
      - `transformation_name` string
      - `error_pointer` string
      - `validation_error_types` string[]
      - `schema_keywords` SchemaKeyword[]
      - `json_patch` DataPlanPatch[]
        - `op` 'unknown' | 'add' | 'remove' | 'replace' | 'copy' | 'move' | 'test'
        - `from` string
        - `path` string
        - `value` string
      - `description` string
  - `activated_environment` 'none' | 'development' | 'production': Data plan can be active in development, production & development (production), or neither. 'none' indicates it's inactive.
  - `data_plan_id` string
  - `quarantine_feed_id` number, nullable

## Other responses

- `400`: Bad Schema
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests

## Changes

- **2026-11-06** `d8df9035366b`: 1 info
  - added the optional property `oneOf[#/components/schemas/ErrorList]/statusCode` to the response with the `400` status

[Operation history](https://skmtc.dev/mparticle/apis/mparticle-data-planning-api/changes/:plan_id/versions/:plan_version/patch.md)

---

[API](https://skmtc.dev/mparticle/apis/mparticle-data-planning-api.md) - [All operations](https://skmtc.dev/mparticle/apis/mparticle-data-planning-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mparticle/apis/mparticle-data-planning-api/revisions/d8df9035366b?raw)
