Mixedbread

Update File

POST/v1/files/{file_id}

AuthorizationLink to section

Authorizationstringrequired

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

Path ParametersLink to section

file_idstringrequired

The ID of the file to update

Request BodyLink to section

filestring(binary)required

The file to update

Response BodyLink to section

idstringrequired

Unique identifier for the file

filenamestringrequired

Name of the file including extension

Constraints

•Minimum length: 1
bytesintegerrequired

Size of the file in bytes

Constraints

•Exclusive minimum: 0
mime_typestringrequired

MIME type of the file

versionintegerrequired

Version of the file

Constraints

•Minimum: 1
created_atstring(date-time)required

Timestamp when the file was created

updated_atstring(date-time)required

Timestamp when the file was last updated

Request
POST/v1/files/{file_id}
from mixedbread import Mixedbread

mxbai = Mixedbread(api_key="YOUR_API_KEY")

file_path = "updated_document.pdf"
with open(file_path, "rb") as f:
    res = mxbai.files.update(file_id="f47ac10b-58cc-4372-a567-0e02b2c3d479", file=f)

    print(res)
Response
JSON
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "filename": "updated_document.pdf",
  "bytes": 2097152,
  "mime_type": "application/pdf",
  "version": 2,
  "created_at": "2025-01-15T10:00:00.000Z",
  "updated_at": "2025-01-15T16:30:00.000Z",
  "object": "file"
}
Last updated: April 7, 2026