Mixedbread

Copy Store

POST/v1/stores/{store_identifier}/copy

Copies a store into a new store with the given name. The copy keeps every file, its metadata and its indexed chunks; nothing is parsed or embedded again. The request returns 202 Accepted with the new store right away and the copy runs in the background: the new store's status is in_progress until it completes, and both stores report progress in copy_state. Neither store accepts file changes while the copy runs, and the source must have no files still being processed.

Authorization

Authorizationstringrequired

Bearer token for API authentication. Format: `Bearer YOUR_API_KEY`

Path Parameters

store_identifierstringrequired

The ID or name of the store to copy

Request Body

namestringrequired

Name for the copy. Can only contain lowercase letters, numbers, periods (.), and hyphens (-)

descriptionstring

Description of the copy; defaults to the source store's description

metadataobject

Metadata for the copy; defaults to the source store's metadata

Response Body

idstringrequired

ID of the new store

namestringrequired

Name of the new store

statusstringrequired

`in_progress` while the copy runs, then `completed` or `failed`

copy_stateobject

Progress of the copy. `role` is `target` on the new store and `source` on the store being copied; `status` is `in_progress` or `failed`; `peer_store_id` is the other store; `error` explains a failure. Cleared once the copy completes

file_countsobject

Counts of files in different processing states; fills in as the copy progresses

objectstringdefault: store

Type of the object

All remaining fields match the Store object.

Errors

409store_frozen_error

The source is already part of a copy

409conflict_error

The source still has files being processed, or the name is already taken

403usage_quota_error

The plan's store limit is reached

Request
POST/v1/stores/{store_identifier}/copy
from mixedbread import Mixedbread

mxbai = Mixedbread(api_key="YOUR_API_KEY")

copy = mxbai.stores.copy(
    store_identifier="my-knowledge-base",
    name="my-store-copy",
)

print(copy)
Response
JSON
{
  "id": "vs_def456",
  "name": "my-store-copy",
  "description": "Product documentation",
  "is_public": false,
  "metadata": {},
  "file_counts": {
    "pending": 0,
    "in_progress": 0,
    "cancelled": 0,
    "completed": 0,
    "failed": 0,
    "total": 0
  },
  "expires_after": null,
  "status": "in_progress",
  "copy_state": {
    "role": "target",
    "status": "in_progress",
    "peer_store_id": "vs_abc123",
    "started_at": "2024-01-20T14:30:00Z",
    "error": null
  },
  "created_at": "2024-01-20T14:30:00Z",
  "updated_at": "2024-01-20T14:30:00Z",
  "last_active_at": "2024-01-20T14:30:00Z",
  "usage_bytes": 0,
  "expires_at": null,
  "object": "store"
}