Upload Document

Upload a document to be indexed and used for search.

Note: Uses a base url of https://documents.vellum.ai.

Headers

X-API-KEYstringRequired

Request

This endpoint expects an object.
labelstringRequired>=1 character<=1000 characters

A human-friendly name for this document. Typically the filename.

contentsstringRequiredformat: "binary"

The file contents of the document.

add_to_index_nameslist of stringsOptional

Optionally include the names of all indexes that you’d like this document to be included in

external_idstringOptional>=1 character<=1000 characters

Optionally include an external ID for this document. This is useful if you want to re-upload the same document later when its contents change and would like it to be re-indexed.

keywordslist of stringsOptional

Optionally include a list of keywords that’ll be associated with this document. Used when performing keyword searches.

metadatastringOptionalformat: "byte"

A stringified JSON object containing any metadata associated with the document that you’d like to filter upon later.

Response

document_idstringformat: "uuid"

The ID of the newly created document.

Errors