---
title: "Copy Workspace Data"
method: POST
path: "/api/workspace/{workspace_ext_id}/copy"
tags: ["workspace"]
---

# Copy Workspace Data

`POST /api/workspace/{workspace_ext_id}/copy`

Copy documents from source workspace to target workspace.

Requires:
- User must have access to source workspace (RLS enforced)
- Target workspace must exist and user must have access
- Workspace-Key header with source workspace key (optional for public workspaces, required for private)
- Target-Workspace-Key header with target workspace key (required)

Copies:
- Document metadata (title, doc_date, shared status, etc.)
- MinIO encrypted files (downloaded to server memory, re-encrypted, uploaded)
- Qdrant vectors (with updated doc_ext_id and chunk_ext_id references)

## Path parameters

- `workspace_ext_id` string, required

## Headers

- `workspace-key` string
- `target-workspace-key` string

## Request body

- CopyRequest
  - `target_workspace_ext_id` string, required
  - `items` string[], required — List of document external IDs to copy (e.g., ['doc-a1b2c3d4', 'doc-e5f6g7h8'])

## Response `200`

Successful Response

- CopyResponse
  - `detail` string, required
  - `documents_copied` integer
  - `results` CopyDocumentResult[]
    - `source_doc_ext_id` string, required
    - `success` boolean, required
    - `new_doc_ext_id` string, nullable
    - `error` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2025-10-29** `2cd7c0e6303a` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/arbicity/apis/arbi/changes/api/workspace/:workspace_ext_id/copy/post.md)

---

[API](https://skmtc.dev/arbicity/apis/arbi.md) · [All operations](https://skmtc.dev/arbicity/apis/arbi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/arbicity/arbi/revisions/1f956ac3d1c1/schema)
