v16

latestOpenAPI 3.1.0raw.githubusercontent.com2026-03-032765158.3 KB
Documents

Add Document

Adds a document to a given collection.

A status code of 201 Created will be returned if a document was successfully added. A status code of 409 Conflict will be returned if the given collection already has a document with the same path.

If overwrite is given a value of true, then a status code of 200 OK will be returned if a document was overwritten (Rather than a status code of 409 Conflict).

When a document is inserted, it can take time to appear in the index. Check the /status/get-status endpoint to see progress.

post/documents/add-document

Request body

collection_namestring required

The name of the collection to be used for this request. A 404 Not Found status code will be returned if this collection name does not exist.

pathstring required

The filepath of the document that you are adding. A 409 Conflict status code will be returned if this path already exists, unless overwrite is set to true.

metadataDocumentMetadataJson
overwriteboolean

Setting this property to true will put this endpoint in "upsert" mode: If the document already exists, this action will atomically replace it.

Response

Successful Response

messagestring

This string will always be "Success!". This may change in the future.