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

# Copy a deployment package to control plane hook



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml post /v4/deployment-packages/{account_id}/copy-to-control-plane-hook
openapi: 3.1.0
info:
  title: EGP API V4
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
tags:
  - name: Models
    description: Model API.
paths:
  /v4/deployment-packages/{account_id}/copy-to-control-plane-hook:
    post:
      tags:
        - package deployments
      summary: Copy a deployment package to control plane hook
      operationId: POST-V4-/deployment-packages/{account_id}/copy-to-control-plane-hook
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            title: Account Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/CopyDeploymentPackageToControlPlaneHookRequest
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CopyDeploymentPackageToControlPlaneHookResponse
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CopyDeploymentPackageToControlPlaneHookRequest:
      properties:
        deployment_package_id:
          title: Deployment Package Id
          type: string
        deployment_package_name:
          title: Deployment Package Name
          type: string
        deployment_package_type:
          $ref: '#/components/schemas/DeploymentPackageType'
        version_constraint:
          $ref: '#/components/schemas/PackageVersionConstraint'
        workspace:
          type: string
          title: Workspace
      type: object
      required:
        - workspace
      title: CopyDeploymentPackageToControlPlaneHookRequest
    CopyDeploymentPackageToControlPlaneHookResponse:
      properties:
        package_id:
          type: string
          title: Package Id
        package_name:
          type: string
          title: Package Name
        result:
          $ref: '#/components/schemas/CopyToControlPlaneHookResult'
        error:
          title: Error
          type: string
      type: object
      required:
        - package_id
        - package_name
      title: CopyDeploymentPackageToControlPlaneHookResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DeploymentPackageType:
      type: string
      enum:
        - EGP_CONFIGURATION
        - BLOB_STORAGE_FILE
        - DOCKER_IMAGE
        - EGP_ENTITY
        - EGP_USER
        - INTERNAL_MODEL_INFO
        - EVALUATION_DATASET
        - MODEL
        - KNOWLEDGE_BASE
        - AGENTS_CONFIG
      title: DeploymentPackageType
    PackageVersionConstraint:
      oneOf:
        - $ref: '#/components/schemas/SemVerMinVersion'
        - $ref: '#/components/schemas/TimestampMinVersion'
        - $ref: '#/components/schemas/ExactVersion'
      title: PackageVersionConstraint
      discriminator:
        propertyName: version_constraint_type
        mapping:
          EXACT_VERSION:
            $ref: '#/components/schemas/ExactVersion'
          SEMVER_MIN:
            $ref: '#/components/schemas/SemVerMinVersion'
          TIMESTAMP_MIN:
            $ref: '#/components/schemas/TimestampMinVersion'
    CopyToControlPlaneHookResult:
      properties:
        status:
          $ref: '#/components/schemas/CopyToControlPlaneHookStatus'
        message:
          type: string
          title: Message
        metadata:
          title: Metadata
          additionalProperties: true
          type: object
      type: object
      required:
        - status
      title: CopyToControlPlaneHookResult
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SemVerMinVersion:
      properties:
        version_constraint_type:
          type: string
          const: SEMVER_MIN
          title: Version Constraint Type
          default: SEMVER_MIN
        minimum_version:
          type: string
          title: Minimum Version
      type: object
      required:
        - minimum_version
      title: SemVerMinVersion
    TimestampMinVersion:
      properties:
        version_constraint_type:
          type: string
          const: TIMESTAMP_MIN
          title: Version Constraint Type
          default: TIMESTAMP_MIN
        minimum_timestamp:
          type: string
          title: Minimum Timestamp
      type: object
      required:
        - minimum_timestamp
      title: TimestampMinVersion
    ExactVersion:
      properties:
        version_constraint_type:
          type: string
          const: EXACT_VERSION
          title: Version Constraint Type
          default: EXACT_VERSION
        package_version_id:
          type: string
          title: Package Version Id
      type: object
      required:
        - package_version_id
      title: ExactVersion
    CopyToControlPlaneHookStatus:
      type: string
      enum:
        - SUCCESS
        - FAILED
        - SKIPPED
        - NO_HOOK_DEFINED
      title: CopyToControlPlaneHookStatus

````