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

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

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

Creates an instant, copy-on-write clone of a namespace.

## Path parameters

- `namespace` string, required

## Request body

- BranchFromNamespaceConfig
  - `source_namespace` string, required — The namespace to create an instant, copy-on-write clone of.

## 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.

---

[API](https://skmtc.net/turbopuffer/apis/turbopuffer-api.md) · [All operations](https://skmtc.net/turbopuffer/apis/turbopuffer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/turbopuffer/turbopuffer-api/versions/245e887f04ab/schema)
