Skip to Content
Mixedbread

Update Store File

Update metadata on a file within a store.

PATCH
/v1/stores/{store_identifier}/files/{file_identifier}

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Api key to access Mixedbreads API

Path Parameters

store_identifier*|

The ID or name of the store

file_identifier*|

The ID or name of the file to update

Request Body

application/json
  1. body

Fields to update for the store file

metadata?|

Updated metadata for the file

Response Body

The updated store file details

application/json
  1. response

Represents a file stored in a store.

id*Id

Unique identifier for the file

filename?Filename

Name of the file

metadata?|

Optional file metadata

external_id?|

External identifier for this file in the store

status?JobStatus

Processing status of the file

Default"pending"
Value in"pending""in_progress""cancelled""completed""failed"
last_error?|

Last error message if processing failed

store_id*Store Id

ID of the containing store

created_at*Created At

Timestamp of store file creation

Formatdate-time
version?|

Version number of the file

usage_bytes?|

Storage usage in bytes

usage_tokens?|

Storage usage in tokens

config?|

Configuration for the file

object?Object

Type of the object

Default"store.file"
chunks?array<|||>|

chunks

content_url*Content Url

Presigned URL for file content

Example Request
from mixedbread import Mixedbread

mxbai = Mixedbread(api_key="YOUR_API_KEY")

file = mxbai.stores.files.update(
    store_identifier="my-knowledge-base",
    file_identifier="f47ac10b-58cc-4372-a567-0e02b2c3d479",
    metadata={"category": "documentation"},
)

print(file)
Example Response
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "external_id": "ext-doc-001",
  "object": "store.file",
  "filename": "example_document.pdf",
  "metadata": {
    "category": "documentation"
  },
  "status": "completed",
  "last_error": null,
  "store_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
  "usage_bytes": 1048576,
  "usage_tokens": 51200,
  "config": {
    "parsing_strategy": "fast"
  },
  "version": 1,
  "created_at": "2025-01-15T16:00:00.000Z",
  "content_url": "https://example.com/files/f47ac10b-58cc-4372-a567-0e02b2c3d479?signature=..."
}