Skip to main content
POST
Upload a knowledge base document

Authorizations

Authorization
string
header
required

Supabase JWT — Authorization: Bearer <token>.

Body

knowledge_base_store_id
string<uuid>
required

The knowledge base store to add the document to.

Minimum string length: 1
Example:

"d9d6f121-1230-48fd-b3a7-8b5a1e8db052"

file
file
required

The document file (binary).

name
string

Document name with its extension, which decides how the file is read: .doc, .docx, .rtf, .odt, .pdf, .pages or .pptx; any other is refused with 422 (name). Falls back to the uploaded file name for multipart.

merchant_id
string

Override merchant id (admin / sub-merchant only).

interview_ids
string<uuid>[] | null

The interviews that may use this document, in the live session and when generating questions. An interview uses this knowledge base once its knowledge_base_store_id is set (job-interview-create / job-interview-update): link it first. Omit it or send null to use the document in every interview on the knowledge base. An empty list limits it to no interview. Each interview must belong to the same company and use this knowledge base. With multipart/form-data, repeat the field or send one JSON array such as ["<id>"], and write an empty list as [].

Example:

Response

The document was uploaded and queued for processing.

knowledge_base_id
string
required

Id of the created knowledge_base record.

limit_to_interviews
boolean
required

True when the document is limited to the interviews in interview_ids. False when every interview on the knowledge base can use it.

interview_ids
string[]

The interviews this document is limited to. Present only when limit_to_interviews is true; an empty list means no interview can use it.