Skip to main content
POST
/
knowledge-base-document-upload
Upload a knowledge base document
curl --request POST \
  --url https://cool.jobmojito.com/functions/v1/knowledge-base-document-upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form knowledge_base_store_id=d9d6f121-1230-48fd-b3a7-8b5a1e8db052 \
  --form file='@example-file' \
  --form 'name=<string>' \
  --form 'merchant_id=<string>'
{
  "knowledge_base_id": "<string>"
}

Authorizations

Authorization
string
header
required

Supabase JWT access token, passed as Authorization: Bearer <token>.

Body

knowledge_base_store_id
string
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 extension). Falls back to the uploaded file name for multipart.

merchant_id
string

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

Response

The document was uploaded and queued for processing.

knowledge_base_id
string
required

Id of the created knowledge_base record.