@@ -356,6 +356,7 @@ def upload_file(
356356 file : FileTypes ,
357357 container_tags : str | Omit = omit ,
358358 file_type : str | Omit = omit ,
359+ metadata : str | Omit = omit ,
359360 mime_type : str | Omit = omit ,
360361 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
361362 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -378,6 +379,10 @@ def upload_file(
378379 text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
379380 notion_doc, webpage, onedrive
380381
382+ metadata: Optional metadata for the document as a JSON string. This is used to store
383+ additional information about the document. Keys must be strings and values can
384+ be strings, numbers, or booleans.
385+
381386 mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
382387 use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
383388
@@ -394,6 +399,7 @@ def upload_file(
394399 "file" : file ,
395400 "container_tags" : container_tags ,
396401 "file_type" : file_type ,
402+ "metadata" : metadata ,
397403 "mime_type" : mime_type ,
398404 }
399405 )
@@ -741,6 +747,7 @@ async def upload_file(
741747 file : FileTypes ,
742748 container_tags : str | Omit = omit ,
743749 file_type : str | Omit = omit ,
750+ metadata : str | Omit = omit ,
744751 mime_type : str | Omit = omit ,
745752 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
746753 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -763,6 +770,10 @@ async def upload_file(
763770 text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
764771 notion_doc, webpage, onedrive
765772
773+ metadata: Optional metadata for the document as a JSON string. This is used to store
774+ additional information about the document. Keys must be strings and values can
775+ be strings, numbers, or booleans.
776+
766777 mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
767778 use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
768779
@@ -779,6 +790,7 @@ async def upload_file(
779790 "file" : file ,
780791 "container_tags" : container_tags ,
781792 "file_type" : file_type ,
793+ "metadata" : metadata ,
782794 "mime_type" : mime_type ,
783795 }
784796 )
0 commit comments