Upsert a file
Create or replace a file in the specified assistant. If a file with the given assistant_file_id already exists, it will be replaced with the new file. If it doesn't exist, a new file will be created with that identifier.
This operation is asynchronous. The file processing will occur in the background.
For guidance and examples, see Manage files.
PINECONE_API_KEY="YOUR_API_KEY"
ASSISTANT_NAME="example-assistant"
FILE_ID="my-custom-file-id"
LOCAL_FILE_PATH="/Users/jdoe/Downloads/example_file.txt"
curl -X PUT "https://prod-1-data.ke.pinecone.io/assistant/files/$ASSISTANT_NAME/$FILE_ID" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2026-04" \
-F "file=@$LOCAL_FILE_PATH"{
"id": "op-1234-abcd-5678",
"operation_type": "upsert_file",
"file_id": "my-custom-file-id",
"status": "Processing",
"created_on": "2025-10-01T12:30:00Z",
"percent_complete": 0
}PUT /files/{assistant_name}/{assistant_file_id}
Parameters
Section titled “Parameters”X-Pinecone-Api-Version(header, string, required) — Required date-based version headerassistant_name(path, string, required) — The name of the assistant to upload files to.assistant_file_id(path, string, required) — The identifier of the file to be created or replaced. Must be 1-128 characters long and consist only of alphanumeric characters, hyphens (-), or underscores (_).multimodal(query, string) — Optional flag to opt in to multimodal file processing (PDFs only). Can be eithertrueorfalse. Default isfalse.
Responses
Section titled “Responses”202— File upload has been accepted for processing. The file will be created if it doesn't exist, or replaced if it already exists. The operation will complete asynchronously.400— Bad request. The request body included invalid request parameters.401— Unauthorized. Possible causes: Invalid API key.404— Assistant not found.500— Internal server error.