---
updatedAt: 2026-04-24T18:36:38.000Z
agentTools:
  projectIndex: https://docs.docupipe.ai/llms.txt
---

# Copy a Class to Another Workspace

Duplicate one of your taxonomy classes into a different workspace. Provide the existing classId and the target workspaceId to create a copy with a new classId owned by the destination workspace.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "DocuPipe",
    "version": "1.0"
  },
  "paths": {
    "/copy/classification": {
      "post": {
        "tags": [
          "Classification"
        ],
        "summary": "Copy a Class to Another Workspace",
        "description": "Duplicate one of your taxonomy classes into a different workspace. Provide the existing classId and the target workspaceId to create a copy with a new classId owned by the destination workspace.",
        "operationId": "post_copy_classification",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClassCopyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassObject"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ClassCopyRequest": {
        "properties": {
          "classId": {
            "type": "string",
            "title": "Class ID",
            "description": "Unique identifier of the class to copy."
          },
          "targetWorkspaceApiKey": {
            "type": "string",
            "title": "Target Workspace api key",
            "description": "API key of the target workspace."
          }
        },
        "type": "object",
        "required": [
          "classId",
          "targetWorkspaceApiKey"
        ],
        "title": "ClassCopyRequest"
      },
      "ClassObject": {
        "properties": {
          "classId": {
            "type": "string",
            "title": "Class ID",
            "description": "Unique identifier of the classification object."
          },
          "className": {
            "type": "string",
            "title": "Class Name",
            "description": "Name of the class."
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Description of the class."
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp",
            "description": "Timestamp of the classification creation."
          }
        },
        "type": "object",
        "required": [
          "classId",
          "className"
        ],
        "title": "ClassObject",
        "description": "Public-facing representation of DocuPipeClass."
      },
      "ErrorResponse": {
        "properties": {
          "detail": {
            "type": "string",
            "title": "Detail",
            "description": "Details about the error"
          }
        },
        "type": "object",
        "required": [
          "detail"
        ],
        "title": "ErrorResponse"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "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"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://app.docupipe.ai"
    }
  ]
}
```