Create a retrieval document

http
POST /projects/{project_reference}/knowledge/retrieval-documents

Create retrieval document. Requires project.knowledge.write.

Parameters

NameInRequiredDescription
project_referencepathYes

Request body

FieldTypeRequiredDescription
titlestringYesDocument title, at least one character.
sourcestringUpstream source reference, such as a file path or URL. Defaults to "".
typestringDocument type label. Defaults to "".
metadataobjectStructured metadata stored with the record: an object of string keys to JSON values.
idstringCaller-chosen record ID. Omit to let the API choose one. An ID that already exists is a conflict. Create the record before writing its chunks; use update to change an existing record.

Responses

StatusDescription
201The created record with its first revision.
400invalid_input: invalid title, ID or metadata
401unauthenticated
404not_found: project not found or not visible
409conflict: a record with this ID already exists
500internal