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.
The SDKs ship a copy_and_poll / copyAndPoll helper that starts the copy and waits until the new store leaves in_progress. See Copy Store.
Authorization
Bearer token for API authentication. Format: `Bearer YOUR_API_KEY`
Path Parameters
The ID or name of the store to copy
Request Body
Name for the copy. Can only contain lowercase letters, numbers, periods (.), and hyphens (-)
Description of the copy; defaults to the source store's description
Metadata for the copy; defaults to the source store's metadata
Response Body
ID of the new store
Name of the new store
`in_progress` while the copy runs, then `completed` or `failed`
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
Counts of files in different processing states; fills in as the copy progresses
storeType of the object
All remaining fields match the Store object.
Errors
The source is already part of a copy
The source still has files being processed, or the name is already taken
The plan's store limit is reached
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){
"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"
}