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

# Create a new project by copying an existing project and providing optional overrides.

> Create a new project by copying an existing project and providing optional overrides. Specify a git repository to link to the copied project or copy the original project's git repository for the copied project.



## OpenAPI

````yaml /api-specs/cloud/public-api.yaml post /api/projects/v1/projects/{projectId}/copy-project
openapi: 3.0.3
info:
  title: Domino Public API
  description: Domino Public API Endpoints
  version: cloud
servers: []
security:
  - DominoApiKey: []
  - BearerAuthentication: []
tags:
  - name: AIGateway
  - name: AppInstances
  - name: AppVersions
  - name: Apps
  - name: AsyncPredictions
  - name: AuditTrail
  - name: BillingTag
  - name: BillingTagSettings
  - name: Cost
  - name: CustomMetrics
  - name: DataSource
  - name: DatasetRw
  - name: DeploymentTargets
  - name: Environments
  - name: Extensions
  - name: GenAI
  - name: HardwareTier
  - name: Jobs
  - name: ModelAPI
  - name: ModelAPIVersion
  - name: ModelDeployment
  - name: Organizations
  - name: PPM
  - name: PersonalAccessToken
  - name: ProjectSharedDatasets
  - name: ProjectTemplates
  - name: Projects
  - name: ProjectsCommits
  - name: ProjectsFiles
  - name: RegisteredModels
  - name: ServiceAccounts
  - name: Users
  - name: Workspaces
paths:
  /api/projects/v1/projects/{projectId}/copy-project:
    post:
      tags:
        - Projects
      summary: >-
        Create a new project by copying an existing project and providing
        optional overrides.
      description: >-
        Create a new project by copying an existing project and providing
        optional overrides. Specify a git repository to link to the copied
        project or copy the original project's git repository for the copied
        project.
      operationId: copyProject
      parameters:
        - description: Project ID
          in: path
          name: projectId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CopyProjectSpecV1'
        description: Information needed in order to copy a project.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectCopyResultEnvelopeV1'
          description: Success
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    CopyProjectSpecV1:
      properties:
        billingTag:
          $ref: '#/components/schemas/BillingTagV1'
        copyDatasets:
          description: Whether to copy the Project's Datasets or not
          type: boolean
        copyNetAppVolumes:
          description: Whether to copy the Project's NetApp Volumes or not
          type: boolean
        gitCodeRepoSpec:
          $ref: '#/components/schemas/GitCodeRepoSpecV1'
        importedGitReposCredentialId:
          description: >-
            The Domino ID of the PAT credential, which will be used to access
            the Imported Git Repos on the new project.
          type: string
        name:
          description: The name of the new Domino Project.
          type: string
        ownerId:
          description: The Domino ID of owner of the copied project.
          type: string
        visibility:
          $ref: '#/components/schemas/ProjectVisibilityV1'
          description: The visibility of the new Project.
      required:
        - copyDatasets
      type: object
    ProjectCopyResultEnvelopeV1:
      properties:
        datasetsNotCopied:
          items:
            $ref: '#/components/schemas/DatasetNotCopiedV1'
          type: array
        metadata:
          $ref: '#/components/schemas/MetadataV1'
        netAppVolumesNotCopied:
          items:
            $ref: '#/components/schemas/NetAppVolumeNotCopiedV1'
          type: array
        project:
          $ref: '#/components/schemas/ProjectV1'
      required:
        - project
        - metadata
      type: object
    BillingTagV1:
      description: Billing Tag to assign to projects for cost aggregation
      properties:
        tag:
          description: The tag to be assigned to projects.
          type: string
      required:
        - tag
      type: object
    GitCodeRepoSpecV1:
      description: >-
        Details needed in order to copy the code repository of a Git-backed
        project.
      properties:
        credentialId:
          description: >-
            The Domino ID of the PAT credential, which will be used to copy
            and/or read from the code repository on the new project.
          type: string
        deepCopy:
          $ref: '#/components/schemas/DeepCopyGitRepoSpecV1'
        importFilesTarget:
          $ref: '#/components/schemas/ImportFilesRepoTargetV1'
        referenceCopy:
          $ref: '#/components/schemas/ReferenceCopyGitRepoSpecV1'
      required:
        - credentialId
      type: object
    ProjectVisibilityV1:
      description: Project visibility
      enum:
        - public
        - searchable
        - private
      type: string
    DatasetNotCopiedV1:
      properties:
        datasetInfo:
          $ref: '#/components/schemas/DatasetInfoV1'
          description: dataset not copied
        errorMessage:
          description: error message explaining why dataset wasn't copied
          type: string
      required:
        - datasetInfo
        - errorMessage
      type: object
    MetadataV1:
      properties:
        notices:
          description: Notices relating to the request
          items:
            type: string
          type: array
        requestId:
          type: string
      required:
        - requestId
        - notices
      type: object
    NetAppVolumeNotCopiedV1:
      properties:
        errorMessage:
          description: error message explaining why volume wasn't copied
          type: string
        volumeInfo:
          $ref: '#/components/schemas/NetAppVolumeInfoV1'
          description: volume not copied
      required:
        - volumeInfo
        - errorMessage
      type: object
    ProjectV1:
      properties:
        billingTag:
          $ref: '#/components/schemas/BillingTagV1'
        collaborators:
          description: List of collaborators, if any
          items:
            $ref: '#/components/schemas/ProjectCollaboratorV1'
          type: array
        description:
          description: A description of the project
          type: string
        id:
          description: Project ID
          example: 626046fcb7e5d347dbe7a904
          type: string
        internalTags:
          description: Optional list of strings containing internal tags of project
          items:
            type: string
          type: array
        isRestricted:
          description: Whether a project is restricted
          type: boolean
        mainRepository:
          $ref: '#/components/schemas/ProjectGitRepositoryV1'
        name:
          description: Name of the project
          example: My Project
          type: string
        ownerId:
          description: userId of the project owner
          example: 662604702b7e5d347dbe7a908
          type: string
        ownerUsername:
          description: username of the project owner
          example: steve_holt
          type: string
        visibility:
          $ref: '#/components/schemas/ProjectVisibilityV1'
      required:
        - id
        - name
        - description
        - visibility
        - ownerId
        - ownerUsername
        - collaborators
        - isRestricted
      type: object
    FailureEnvelopeV1:
      properties:
        errors:
          description: Errors that caused a request to fail
          items:
            type: string
          type: array
        requestId:
          description: Id used to correlate a request with server actions.
          example: bbd78579-93c4-45ee-a983-0d5c8da6d5b1
          type: string
      required:
        - requestId
        - errors
      type: object
    DeepCopyGitRepoSpecV1:
      description: Data which specifies what the copied repository will look like.
      properties:
        newRepoName:
          description: The name of the new repository.
          type: string
        newRepoOwnerName:
          description: >-
            The name of the user who will own the new repository in the git
            service provider.
          type: string
        visibility:
          $ref: '#/components/schemas/ProviderRepoVisibilityV1'
      required:
        - newRepoName
        - newRepoOwnerName
        - visibility
      type: object
    ImportFilesRepoTargetV1:
      description: Specifies what git repository to import the source project files into
      properties:
        force:
          description: >-
            Whether or not to overwrite all files and git history in the
            repository
          type: boolean
        repoName:
          description: The name of the git repository to import the project files into
          type: string
        repoOwnerName:
          description: The name of the target git repository's owner
          type: string
      required:
        - repoName
        - repoOwnerName
      type: object
    ReferenceCopyGitRepoSpecV1:
      description: >-
        Specifies the git service provider repository to use as the code
        repository in the new Domino project.
      properties:
        mainRepoUrl:
          description: >-
            The cloneable url for the git service provider repository. Must be a
            http(s) schema url.
          type: string
      required:
        - mainRepoUrl
      type: object
    DatasetInfoV1:
      properties:
        createdAt:
          description: When the dataset was created
          example: '2022-03-12T02:13:44.467Z'
          format: date-time
          type: string
        description:
          description: A description of the dataset
          type: string
        id:
          description: Dataset ID
          example: 62313ce67a0af0281c01a6a5
          type: string
        name:
          description: Name of the dataset
          example: My Dataset
          type: string
        projectId:
          description: ID of the project this dataset belongs to
          example: 62313ce67a0af0281c01a6a5
          type: string
      required:
        - id
        - name
        - createdAt
      type: object
    NetAppVolumeInfoV1:
      properties:
        createdAt:
          description: When the NetApp volume was created
          example: '2022-03-12T02:13:44.467Z'
          format: date-time
          type: string
        description:
          description: A description of the NetApp volume
          type: string
        id:
          description: NetApp Volume ID
          example: 06cd6820-3226-4d41-99b2-14ec51e38771
          type: string
        name:
          description: Name of the NetApp volume
          example: My NetApp Volume
          type: string
      required:
        - id
        - name
      type: object
    ProjectCollaboratorV1:
      properties:
        id:
          description: userId of collaborating user or organization
          example: 662604702b7e5d347dbe7a908
          type: string
        role:
          description: Collaborator's role in the project
          enum:
            - contributor
            - launcherUser
            - resultsConsumer
            - projectImporter
          type: string
      required:
        - id
        - role
      type: object
    ProjectGitRepositoryV1:
      properties:
        defaultRef:
          $ref: '#/components/schemas/ProjectRepositoryReferenceV1'
        id:
          description: Id of the repository
          example: 62604702b7e5d347dbe7a908
          type: string
        name:
          description: >-
            Optional name of the repository in the project. If not provided, a
            name will be inferred from the URL
          type: string
        serviceProvider:
          $ref: '#/components/schemas/GitServiceProviderV1'
        uri:
          description: URI of the repository origin
          example: https://github.com/torvalds/linux
          type: string
      required:
        - id
        - uri
        - defaultRef
        - serviceProvider
      type: object
    ProviderRepoVisibilityV1:
      description: >-
        The visibility of the code repo. Internal can only be used for Github
        Enterprise.
      enum:
        - public
        - private
        - internal
      type: string
    ProjectRepositoryReferenceV1:
      properties:
        refType:
          $ref: '#/components/schemas/GitReferenceTypeV1'
        value:
          type: string
      required:
        - refType
      type: object
    GitServiceProviderV1:
      description: Git service provider
      enum:
        - bitbucket
        - bitbucketServer
        - github
        - githubEnterprise
        - gitLab
        - gitLabEnterprise
        - unknown
      type: string
    GitReferenceTypeV1:
      enum:
        - head
        - branch
        - tag
        - commit
      type: string
  responses:
    '400':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Bad Request
    '401':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: >-
        The current user cannot perform this operation because they are not
        logged in
    '403':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: The current user is not authorized to perform this operation
    '404':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Not Found
    '429':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: The user has sent too many requests in a given amount of time.
    '500':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Internal Server Error
  securitySchemes:
    DominoApiKey:
      in: header
      name: X-Domino-Api-Key
      type: apiKey
    BearerAuthentication:
      in: header
      name: Authorization
      type: apiKey

````