Mixedbread

Copy Store

Copy a store into a new store without re-parsing or re-embedding anything.

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.

Errors

Besides 422 for an invalid request, a copy fails before it starts with:

StatusWhen
409The source is already part of a copy, still has files being processed, or lives in a different storage bucket than new stores of your organization; or the name is already taken
403Your plan's store limit is reached, or a scope-restricted API key gives the copy other tags
POST
/v1/stores/{store_identifier}/copy

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Api key to access Mixedbreads API

Path Parameters

store_identifier*|

The ID or name of the store to copy

Request Body

application/json
  1. body

Name and optional overrides for the copy

name*Name

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

Length1 <= length <= 128
description?|

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

metadata?|

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

tags?array<string>|

Tags for the copy; defaults to the source store's tags

Response Body

The new store; its contents arrive in the background

application/json
  1. response

Model representing a store with its metadata and timestamps.

id*Id

Unique identifier for the store

name*Name

Name of the store

Length1 <= length <= 128
description?|

Detailed description of the store's purpose and contents

is_public?Is Public

Whether the store can be accessed by anyone with valid login credentials

Defaultfalse
license?|

License for public stores

metadata?|

Additional metadata associated with the store

tags?array<string>

Tags for organizing stores

config?|

Store-level configuration defaults

bucket_id?|

Customer bucket backing this store's storage; null = platform default

file_counts?

Counts of files in different states

expires_after?|

Optional expiration policy

status?StoreStatus

Processing status of the store

Default"completed"
Value in"expired""in_progress""completed""failed"
created_at*Created At

Timestamp when the store was created

Formatdate-time
updated_at*Updated At

Timestamp when the store was last updated

Formatdate-time
last_active_at?|

Timestamp when the store was last used

usage_bytes?Usage Bytes

Total storage usage in bytes

Default0
usage_tokens?Usage Tokens

Total storage usage in tokens

Default0
expires_at?|

Optional expiration timestamp for the store

copy_state?|

Set while the store is being copied from or into, and when a copy into it failed

object?Object

Type of the object

Default"store"
Example Request
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)
Example Response
{
  "id": "vs_def456",
  "name": "my-store-copy",
  "description": "Product documentation",
  "is_public": false,
  "metadata": {},
  "tags": [],
  "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"
}