---
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`

## Request

- Base URL: `https://{region}.turbopuffer.com`
- URL: `https://{region}.turbopuffer.com/v2/namespaces/{namespace}?stainless_overload=branchFrom`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/turbopuffer/apis/turbopuffer-api/docs/v2/namespaces/:namespace%3Fstainless_overload=branchFrom/post.ts> (a function with typed inputs; its response is checked against the schema)

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

## Path parameters

- `namespace` string, required

## Request body

- BranchFromNamespaceConfig: Configuration for branching from another namespace.
  - `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 unsigned 64-bit 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 unsigned 64-bit 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 unsigned 64-bit 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.
    - `embedding_tokens` integer: The number of tokens embedded. Only set when using a native embedding model.
    - `embedding_ms` integer: Time spent embedding text, in milliseconds. Only set when using a native embedding model.

## Other responses

- `default`: An error response.

## Changes

- **2026-10-08** `b7b110f96b73`: 2 info
  - added the optional property `performance/embedding_ms` to the response with the `200` status
  - added the optional property `performance/embedding_tokens` to the response with the `200` status
- **2026-04-29** `a3042c754d27`: 1 breaking, 1 warning
  - added the new required request property `source_namespace`
  - removed the request property `branch_from_namespace`
- **2026-04-17** `e91997c8b570`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/turbopuffer/apis/turbopuffer-api/changes/v2/namespaces/:namespace%3Fstainless_overload=branchFrom/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/328394035cba?raw)
