---
title: "POST /v2/namespaces/{namespace}?stainless_overload=copyFrom"
method: POST
path: "/v2/namespaces/{namespace}?stainless_overload=copyFrom"
---

# POST /v2/namespaces/{namespace}?stainless_overload=copyFrom

`POST /v2/namespaces/{namespace}?stainless_overload=copyFrom`

Copy all documents from another namespace into this one.

## Path parameters

- `namespace` string, required

## Request body

- CopyFromNamespaceRequest
  - `source_namespace` string, required — The namespace to copy documents from.
  - `source_api_key` string — (Optional) An API key for the organization containing the source namespace
  - `source_region` string — (Optional) The region of the source namespace.
  - `dest_encryption` union — The encryption configuration for a namespace.
    - object — Encrypt the namespace with a customer-managed encryption key (CMEK).
      - `mode` 'customer-managed', required
      - `key_name` string, required — The identifier of the CMEK key to use for encryption. For GCP, the fully-qualified resource name of the key. For AWS, the ARN of the key.
    - object — Use the default server-side encryption (SSE).
      - `mode` 'default', required

## Response `200`

The status of the request.

- WriteResult — The response to a successful write request.
  - `status` 'OK', required — The status of the request.
  - `message` string, required — A message describing the result of the write request.
  - `rows_affected` integer, required — The number of rows affected by the write request.
  - `rows_upserted` integer — The number of rows upserted by the write request.
  - `rows_patched` integer — The number of rows patched by the write request.
  - `rows_deleted` integer — The number of rows deleted by the write request.
  - `rows_remaining` boolean — Whether more documents match the filter for partial operations.
  - `upserted_ids` Id[] — The IDs of documents that were upserted. Only included when `return_affected_ids` is true and at least one document was upserted.
    - union — An identifier for a document.
      - string, uuid — A UUID.
      - string — A string ID.
      - integer — An integer ID.
  - `patched_ids` Id[] — The IDs of documents that were patched. Only included when `return_affected_ids` is true and at least one document was patched.
    - union — An identifier for a document.
      - string, uuid — A UUID.
      - string — A string ID.
      - integer — An integer ID.
  - `deleted_ids` Id[] — The IDs of documents that were deleted. Only included when `return_affected_ids` is true and at least one document was deleted.
    - union — An identifier for a document.
      - string, uuid — A UUID.
      - string — A string ID.
      - integer — An integer ID.
  - `billing` WriteBilling, required — The billing information for a write request.
    - `billable_logical_bytes_written` integer, required — The number of billable logical bytes written to the namespace.
    - `query` QueryBilling — The billing information for a query.
      - `billable_logical_bytes_queried` integer, required — The number of billable logical bytes queried from the namespace.
      - `billable_logical_bytes_returned` integer, required — The number of billable logical bytes returned from the query.
  - `performance` WritePerformance — The performance information for a write request.
    - `server_total_ms` integer, required — Request time measured on the server, in milliseconds.

## Other responses

- `default` — An error response.

## Changes

- **2026-06-09** `39cfd0e01138` — 2 breaking, 3 warning
  - added `#/components/schemas/CopyFromNamespaceConfig, subschema #2` to the request body `allOf` list
  - the request's body type changed from `object` to no type
  - removed the request property `source_api_key`
  - removed the request property `source_namespace`
  - …1 more
- **2026-04-29** `a3042c754d27` — 1 breaking, 1 warning, 2 info
  - added the new required request property `source_namespace`
  - removed the request property `copy_from_namespace`
  - added the new optional request property `source_api_key`
  - added the new optional request property `source_region`
- **2026-04-17** `e91997c8b570` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/turbopuffer/apis/turbopuffer-api/changes/v2/namespaces/:namespace?stainless_overload=copyFrom/post.md)

---

[API](https://skmtc.dev/turbopuffer/apis/turbopuffer-api.md) · [All operations](https://skmtc.dev/turbopuffer/apis/turbopuffer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/turbopuffer/apis/turbopuffer-api/revisions/ac76e8da9620?raw)
