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

# Deprecate a version

> Mark an approved version deprecated. Crews pinned to it keep running.



## OpenAPI

````yaml post /api/registry/versions/{version_id}/deprecate
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/registry/versions/{version_id}/deprecate:
    post:
      tags:
        - Registry
      summary: Deprecate a version
      description: Mark an approved version deprecated. Crews pinned to it keep running.
      operationId: deprecate_version_api_registry_versions__version_id__deprecate_post
      parameters:
        - name: version_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The version's ID.
            title: Version Id
          description: The version's ID.
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ReasonRequest'
                - type: 'null'
              title: Request
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtifactDetail'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    ReasonRequest:
      properties:
        reason:
          type: string
          maxLength: 2000
          title: Reason
          default: ''
      type: object
      title: ReasonRequest
      description: A reason, required to reject and to withdraw.
    ArtifactDetail:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        kind:
          $ref: '#/components/schemas/ArtifactKind'
        scope:
          $ref: '#/components/schemas/ArtifactScope'
        name:
          type: string
          title: Name
        display_name:
          type: string
          title: Display Name
        description:
          type: string
          title: Description
        owner_id:
          type: string
          title: Owner Id
        is_system:
          type: boolean
          title: Is System
        parent_artifact_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Artifact Id
        promoted_from_artifact_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Promoted From Artifact Id
        latest_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Version
          description: Newest version of any status.
        latest_status:
          anyOf:
            - $ref: '#/components/schemas/api__models__registry_models__VersionStatus'
            - type: 'null'
        latest_approved_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Approved Version
        has_draft:
          type: boolean
          title: Has Draft
          default: false
        used_in_templates:
          type: integer
          title: Used In Templates
          default: 0
        used_in_agents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Used In Agents
          description: 'Context packs only: visible agents whose newest version loads it.'
        write:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Write
          description: 'Tools only: effective write flag.'
        needs_sign_off:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Needs Sign Off
          description: 'Tools only: a write tool not yet signed off.'
        sensitivity:
          anyOf:
            - type: string
            - type: 'null'
          title: Sensitivity
          description: >-
            Context packs only: the newest approved version's effective
            sensitivity.
        health:
          anyOf:
            - type: string
              enum:
                - ok
                - stale
                - broken
            - type: 'null'
          title: Health
          description: 'Context packs only: whether its items resolve.'
        can_use:
          type: boolean
          title: Can Use
          description: 'False: you are limited and it is given to you to view only.'
          default: true
        updated_at:
          type: string
          format: date-time
          title: Updated At
        versions:
          items:
            $ref: '#/components/schemas/ArtifactVersionResponse'
          type: array
          title: Versions
      type: object
      required:
        - id
        - kind
        - scope
        - name
        - display_name
        - description
        - owner_id
        - is_system
        - updated_at
        - versions
      title: ArtifactDetail
      description: An artifact with all its versions.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    ArtifactKind:
      type: string
      enum:
        - agent
        - skill
        - mcp_server
        - tool
        - context_pack
        - ontology
        - prompt
        - workflow
        - brand
        - code_repo
      title: ArtifactKind
      description: What an artifact is.
    ArtifactScope:
      type: string
      enum:
        - personal
        - tenant
      title: ArtifactScope
      description: Who an artifact is for. ``tenant`` is shown as "Global".
    api__models__registry_models__VersionStatus:
      type: string
      enum:
        - draft
        - submitted
        - approved
        - rejected
        - deprecated
        - withdrawn
      title: VersionStatus
      description: Lifecycle of one version.
    ArtifactVersionResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        artifact_id:
          type: string
          format: uuid
          title: Artifact Id
        version:
          type: string
          title: Version
        status:
          $ref: '#/components/schemas/api__models__registry_models__VersionStatus'
        spec:
          additionalProperties: true
          type: object
          title: Spec
        changelog:
          type: string
          title: Changelog
        created_by:
          type: string
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
        submitted_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Submitted By
        submitted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Submitted At
        reviewed_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Reviewed By
        reviewed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Reviewed At
        review_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Review Reason
        deprecated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deprecated At
        withdrawn_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Withdrawn At
        withdrawn_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Withdrawn Reason
        promoted_from_version_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Promoted From Version Id
        used_in_templates:
          type: integer
          title: Used In Templates
          default: 0
      type: object
      required:
        - id
        - artifact_id
        - version
        - status
        - spec
        - changelog
        - created_by
        - created_at
      title: ArtifactVersionResponse
      description: One version of an artifact.
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

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