Add File to Store
POST/v1/stores/{store_identifier}/files
AuthorizationLink to section
Authorizationstringrequired
Bearer token for API authentication. Format: `Bearer YOUR_API_KEY`
Path ParametersLink to section
store_identifierstringrequired
The ID or name of the store
Request BodyLink to section
file_idstring(uuid)required
ID of the file to add
external_idstring
Optional external identifier for the file. Can be used to reference the file in subsequent operations. Supports slashes for path-like identifiers (e.g., 'docs/api/auth.md')
overwritebooleandefault:
trueWhether to overwrite an existing file with the same external_id
metadataobject
Optional metadata for the file
Response BodyLink to section
idstringrequired
Unique identifier for the file
filenamestring
Name of the file
metadataobject
Optional file metadata
external_idstring
External identifier for this file in the store
statusenum
StoreFileStatus
Possible values
pendingin_progresscancelledcompletedfailedlast_errorobject
Last error message if processing failed
store_idstringrequired
ID of the containing store
created_atstring(date-time)required
Timestamp of store file creation
versioninteger
Version number of the file
usage_bytesinteger
Storage usage in bytes
usage_tokensinteger
Storage usage in tokens
objectstringdefault:
store.fileType of the object
content_urlstringrequired
Presigned URL for file content
Request
POST/v1/stores/{store_identifier}/files
from mixedbread import Mixedbread
mxbai = Mixedbread(api_key="YOUR_API_KEY")
file = mxbai.stores.files.create(
"my-knowledge-base",
file_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
metadata={"category": "documentation"},
)
print(file)Response
JSON
{
"id": "{{FILE_ID}}",
"external_id": "ext-doc-001",
"object": "store.file",
"filename": "example_document.pdf",
"metadata": {
"category": "documentation"
},
"status": "in_progress",
"last_error": null,
"store_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"usage_bytes": 0,
"usage_tokens": 0,
"config": {
"parsing_strategy": "fast"
},
"version": 1,
"created_at": "2025-01-15T16:00:00.000Z",
"content_url": "https://example.com/files/{{FILE_ID}}?signature=..."
}Last updated: May 27, 2026