beta.libraries.documents

Upload a new document.

Changed on

Given a library, upload a new document to that library. It is queued for processing, it status will change it has been processed. The processing has to be completed in order be discoverable for the library search

post/v1/libraries/{library_id}/documents

Request

Path parameters

library_idstring uuid required

Request body multipart/form-data

filestring binary required

The File object (not file name) to be uploaded. To upload a file and specify a custom file name you should format your request as such:

file=@path/to/your/file.jsonl;filename=custom_name.jsonl

Otherwise, you can just keep the original file name:

file=@path/to/your/file.jsonl

Response

A document with the same hash was found in this library. Returns the existing document.

idstring uuid required
library_idstring uuid required
hashstring nullable required
mime_typestring nullable required
extensionstring nullable required
sizeinteger nullable required
namestring required
summarystring nullable
created_atstring date-time required
last_processed_atstring date-time nullable
number_of_pagesinteger nullable
process_status'self_managed' | 'missing_content' | 'noop' | 'done' | 'todo' | 'in_progress' | 'error' | 'waiting_for_capacity' required
uploaded_by_idstring uuid nullable required
uploaded_by_typestring required
tokens_processing_main_contentinteger nullable
tokens_processing_summaryinteger nullable
urlstring nullable
attributesobject nullable
expires_atstring date-time nullable

If set, the document will be automatically deleted after this date.

processing_statusstring required
tokens_processing_totalinteger required

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      response property hash deprecated

    • info

      response property hash deprecated

    • info

      response property processing_status deprecated

    • info

      response property processing_status deprecated

    • info

      response property tokens_processing_main_content deprecated

    • info

      response property tokens_processing_main_content deprecated

    • info

      response property tokens_processing_summary deprecated

    • info

      response property tokens_processing_summary deprecated

    • info

      endpoint added