---
title: "Update Model Version"
method: PUT
path: "/api/v1/model_versions/{model_version_id}"
tags: ["model_versions"]
---

# Update Model Version

`PUT /api/v1/model_versions/{model_version_id}`

Get all model versions by filter.

Args:
    model_version_id: The ID of model version to be updated.
    model_version_update_model: The model version to be updated.

Returns:
    An updated model version.

## Path parameters

- `model_version_id` string, uuid, required

## Request body

- ModelVersionUpdate — Update model for model versions.
  - `model` string, uuid, required — The ID of the model containing version
  - `stage` union — Target model version stage to be set
    - string
    - 'none' | 'staging' | 'production' | 'archived' | 'latest' — All possible stages of a Model Version.
  - `force` boolean — Whether existing model version in target stage should be silently archived or an error should be raised.
  - `name` string, nullable — Target model version name to be set
  - `description` string, nullable — Target model version description to be set
  - `add_tags` string[], nullable — Tags to be added to the model version
  - `remove_tags` string[], nullable — Tags to be removed from the model version

## Response `200`

Successful Response

- ModelVersionResponse — Response model for model versions.
  - `body` ModelVersionResponseBody — Response body for model versions.
    - `created` string, date-time, required
    - `updated` string, date-time, required
    - `user` UserResponse — Response model for user and service accounts. This returns the activation_token that is required for the user-invitation-flow of the frontend. The email is returned optionally as well for use by the analytics on the client-side.
      - `body` UserResponseBody — Response body for users.
        - `created` string, date-time, required
        - `updated` string, date-time, required
        - `active` boolean
        - `activation_token` string, nullable
        - `full_name` string
        - `email_opted_in` boolean, nullable — `null` if not answered, `true` if agreed, `false` if skipped.
        - `is_service_account` boolean, required
        - `is_admin` boolean, required
      - `metadata` UserResponseMetadata — Response metadata for users.
        - `email` string, nullable
        - `external_user_id` string, uuid, nullable
        - `user_metadata` object
      - `resources` UserResponseResources — Class for all resource models associated with the user entity.
      - `id` string, uuid, required
      - `permission_denied` boolean
      - `name` string, required
    - `stage` string, nullable — The stage of the model version
    - `number` integer, required — The number of the model version
    - `model` ModelResponse, required — Response model for models.
      - `body` ModelResponseBody — Response body for models.
        - `created` string, date-time, required
        - `updated` string, date-time, required
        - `user` UserResponse — Response model for user and service accounts. This returns the activation_token that is required for the user-invitation-flow of the frontend. The email is returned optionally as well for use by the analytics on the client-side.
          - `body` UserResponseBody — Response body for users.
            - `created` string, date-time, required
            - `updated` string, date-time, required
            - `active` boolean
            - `activation_token` string, nullable
            - `full_name` string
            - `email_opted_in` boolean, nullable — `null` if not answered, `true` if agreed, `false` if skipped.
            - `is_service_account` boolean, required
            - `is_admin` boolean, required
          - `metadata` UserResponseMetadata — Response metadata for users.
            - `email` string, nullable
            - `external_user_id` string, uuid, nullable
            - `user_metadata` object
          - `resources` UserResponseResources — Class for all resource models associated with the user entity.
          - `id` string, uuid, required
          - `permission_denied` boolean
          - `name` string, required
        - `tags` TagResponse[], required
          - `body` TagResponseBody — Response body for tags.
            - `created` string, date-time, required
            - `updated` string, date-time, required
            - `color` 'grey' | 'purple' | 'red' | 'green' | 'yellow' | 'orange' | 'lime' | 'teal' | 'turquoise' | 'magenta' | 'blue' — All possible color variants for frontend.
            - `tagged_count` integer, required — The count of resources tagged with this tag.
          - `metadata` BaseResponseMetadata — Base metadata model. Used as a base class for all metadata models associated with responses.
          - `resources` TagResponseResources — Class for all resource models associated with the tag entity.
          - `id` string, uuid, required
          - `permission_denied` boolean
          - `name` string, required — The unique title of the tag.
        - `latest_version_name` string, nullable
        - `latest_version_id` string, uuid, nullable
      - `metadata` ModelResponseMetadata — Response metadata for models.
        - `workspace` WorkspaceResponse, required — Response model for workspaces.
          - `body` WorkspaceResponseBody — Response body for workspaces.
            - `created` string, date-time, required
            - `updated` string, date-time, required
          - `metadata` WorkspaceResponseMetadata — Response metadata for workspaces.
            - `description` string
          - `resources` WorkspaceResponseResources — Class for all resource models associated with the workspace entity.
          - `id` string, uuid, required
          - `permission_denied` boolean
          - `name` string, required
        - `license` string, nullable
        - `description` string, nullable
        - `audience` string, nullable
        - `use_cases` string, nullable
        - `limitations` string, nullable
        - `trade_offs` string, nullable
        - `ethics` string, nullable
        - `save_models_to_registry` boolean
      - `resources` ModelResponseResources — Class for all resource models associated with the model entity.
      - `id` string, uuid, required
      - `permission_denied` boolean
      - `name` string, required
    - `model_artifact_ids` object — Model artifacts linked to the model version
    - `data_artifact_ids` object — Data artifacts linked to the model version
    - `deployment_artifact_ids` object — Deployment artifacts linked to the model version
    - `pipeline_run_ids` object — Pipeline runs linked to the model version
    - `tags` TagResponse[]
      - `body` TagResponseBody — Response body for tags.
        - `created` string, date-time, required
        - `updated` string, date-time, required
        - `color` 'grey' | 'purple' | 'red' | 'green' | 'yellow' | 'orange' | 'lime' | 'teal' | 'turquoise' | 'magenta' | 'blue' — All possible color variants for frontend.
        - `tagged_count` integer, required — The count of resources tagged with this tag.
      - `metadata` BaseResponseMetadata — Base metadata model. Used as a base class for all metadata models associated with responses.
      - `resources` TagResponseResources — Class for all resource models associated with the tag entity.
      - `id` string, uuid, required
      - `permission_denied` boolean
      - `name` string, required — The unique title of the tag.
  - `metadata` ModelVersionResponseMetadata — Response metadata for model versions.
    - `workspace` WorkspaceResponse, required — Response model for workspaces.
      - `body` WorkspaceResponseBody — Response body for workspaces.
        - `created` string, date-time, required
        - `updated` string, date-time, required
      - `metadata` WorkspaceResponseMetadata — Response metadata for workspaces.
        - `description` string
      - `resources` WorkspaceResponseResources — Class for all resource models associated with the workspace entity.
      - `id` string, uuid, required
      - `permission_denied` boolean
      - `name` string, required
    - `description` string, nullable — The description of the model version
    - `run_metadata` object — Metadata linked to the model version
  - `resources` ModelVersionResponseResources — Class for all resource models associated with the model version entity.
    - `services` PageServiceResponse, required
      - `index` integer, required
      - `max_size` integer, required
      - `total_pages` integer, required
      - `total` integer, required
      - `items` ServiceResponse[], required
        - `body` ServiceResponseBody — Response body for services.
          - `created` string, date-time, required
          - `updated` string, date-time, required
          - `user` UserResponse — Response model for user and service accounts. This returns the activation_token that is required for the user-invitation-flow of the frontend. The email is returned optionally as well for use by the analytics on the client-side.
            - `body` UserResponseBody — Response body for users.
              - …
            - `metadata` UserResponseMetadata — Response metadata for users.
              - …
            - `resources` UserResponseResources — Class for all resource models associated with the user entity.
            - `id` string, uuid, required
            - `permission_denied` boolean
            - `name` string, required
          - `service_type` ServiceType, required — Service type descriptor. Attributes: type: service type flavor: service flavor name: name of the service type description: description of the service type logo_url: logo of the service type
            - `type` string, required
            - `flavor` string, required
            - `name` string
            - `description` string
            - `logo_url` string
          - `labels` object, nullable
          - `state` 'inactive' | 'active' | 'pending_startup' | 'pending_shutdown' | 'error' | 'scaled_to_zero' — Possible states for the service and service endpoint.
        - `metadata` ServiceResponseMetadata — Response metadata for services.
          - `workspace` WorkspaceResponse, required — Response model for workspaces.
            - `body` WorkspaceResponseBody — Response body for workspaces.
              - …
            - `metadata` WorkspaceResponseMetadata — Response metadata for workspaces.
              - …
            - `resources` WorkspaceResponseResources — Class for all resource models associated with the workspace entity.
            - `id` string, uuid, required
            - `permission_denied` boolean
            - `name` string, required
          - `service_source` string, nullable, required
          - `admin_state` 'inactive' | 'active' | 'pending_startup' | 'pending_shutdown' | 'error' | 'scaled_to_zero', required — Possible states for the service and service endpoint.
          - `config` object, required
          - `status` object, nullable, required
          - `endpoint` object, nullable
          - `prediction_url` string, nullable
          - `health_check_url` string, nullable
        - `resources` ServiceResponseResources — Class for all resource models associated with the service entity.
        - `id` string, uuid, required
        - `permission_denied` boolean
        - `name` string, required
  - `id` string, uuid, required
  - `permission_denied` boolean
  - `name` string, nullable — The name of the model version

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/zenml-io/apis/zenml-2.md) · [All operations](https://skmtc.net/zenml-io/apis/zenml-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zenml-io/zenml-2/revisions/febb01b8bce3/schema)
