Add a document with pipeline ID in body
POST/documents
Adds a document, or a new version of an existing document, to the pipeline named in the pipeline_id field of the body. The operation behaves as POST /pipelines/{pipeline_id}/documents: processing is asynchronous, and the response returns the new version with the status pending, or failed when the processing job cannot be queued.
Permissions. Read and execute on the pipeline, execute on the text splitter that processes the document, and the document's classification in the allow-list.
Documents, versions and fragments describes the request fields, processing and versions.
Request
Responses
- 201
- 400
- 401
- 403
- 404
The version was accepted. The body is the new version, with the status pending, or failed when the processing job could not be queued.
The metadata does not satisfy the pipeline's metadata schema (Invalid metadata), or a new version names a classification that differs from the classification of the existing document (Classification mismatch).
The authentication headers are missing or invalid, or the API key is inactive or expired. Errors lists the messages.
The license does not permit the operation (Invalid license: ...), or the key's classification allow-list does not permit the classification (Unauthorized: access level ... required for Pipeline with id ...).
No pipeline with the identifier in pipeline_id exists or the key lacks execute permission on the pipeline (Pipeline with id <id> not found), or the pipeline does not define the classification or the key's allow-list excludes the classification (Classification not found). The text splitter does not exist or the key lacks execute permission on the text splitter (Text Splitter with id <id> not found).